Date: Wed, 6 Mar 2002 11:53:08 -0800 (PST) From: Matt Dillon <dillon@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/ufs/ufs ufs_readwrite.c Message-ID: <200203061953.g26Jr8w94263@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
dillon 2002/03/06 11:53:08 PST Modified files: (Branch: RELENG_4) sys/ufs/ufs ufs_readwrite.c Log: MFC b_resid KASSERT from 1.85. This is a safety check to make sure that b_resid is the expected 0 value in preparation for a future commit that will remove the b_resid calculation entirely. It turns out that b_resid WILL always be 0 except for the case where a write fails. But in the write failure case the buffer is still valid for reading and we still want to treat it as such (as if b_resid were 0, even though it isn't). The filesystem code should not use b_resid in any calculations except those involving short-read situations, and even then b_resid will not be persistent for a VMIO backed buffer since the buffer may be destroyed and later reconstituted, resetting b_resid to 0. short-reads are not used by most filesystems. They are used by NFS only when reading softlinks (using a non VMIO buffer). Joy. Revision Changes Path 1.65.2.10 +6 -0 src/sys/ufs/ufs/ufs_readwrite.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203061953.g26Jr8w94263>