The following reply was made to PR kern/163076; it has been noted by GNATS.
From: Petr Salinger <petr.salin...@seznam.cz> To: Jaakko Heinonen <j...@freebsd.org> Cc: Poul-Henning Kamp <p...@phk.freebsd.dk>, bug-follo...@freebsd.org Subject: Re: kern/163076: It is not possible to read in chunks from linprocfs and procfs. Date: Tue, 6 Dec 2011 09:38:49 +0100 (CET) >>> Yes, r222004 changed sbuf_finish() to not clear s->s_error which causes >>> the regression. I am not sure if we should blame r222004 or the pseudofs >>> code. The "dd testcase" works for us with change bellow. It also solves the original problem. I am unsure whether it is a right way, though. Petr --- a/sys/fs/pseudofs/pseudofs_vnops.c +++ b/sys/fs/pseudofs/pseudofs_vnops.c @@ -640,7 +640,7 @@ if (buflen > MAXPHYS + 1) buflen = MAXPHYS + 1; - sb = sbuf_new(sb, NULL, buflen, 0); + sb = sbuf_new(sb, NULL, MAXPHYS + 1, 0); if (sb == NULL) { error = EIO; goto ret; @@ -654,7 +654,12 @@ } sbuf_finish(sb); - error = uiomove_frombuf(sbuf_data(sb), sbuf_len(sb), uio); + + if (buflen > sbuf_len(sb)) + buflen = sbuf_len(sb); + else + buflen--; + error = uiomove_frombuf(sbuf_data(sb), buflen, uio); sbuf_delete(sb); ret: vn_lock(vn, locked | LK_RETRY); _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"