Date: Mon, 11 Mar 2002 11:13:22 -0800 (PST) From: Ian Dowse <iedowse@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/ufs/ufs ufs_dirhash.c Message-ID: <200203111913.g2BJDMs78114@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
iedowse 2002/03/11 11:13:22 PST Modified files: sys/ufs/ufs ufs_dirhash.c Log: Fix a bug in ufsdirhash_adjfree() that caused it to incorrectly update the free-space statistics in some cases. The problem affected directory blocks when the free space dropped below the size of the maximum allowed entry size. When this happened, the free-space summary information could claim that there are no further blocks that can fit a maximum-size entry, even if there are. The effect of this bug is that the directory may be enlarged even though there is space within the directory for the new entry. This wastes disk space and has a negative impact on performance. Fix it by correctly computing the dh_firstfree array index, adding a helper macro for clarity. Put an extra sanity check into ufsdirhash_checkblock() to detect the situation in future. Found by: dwmalone Reviewed by: dwmalone MFC after: 1 week Revision Changes Path 1.8 +7 -10 src/sys/ufs/ufs/ufs_dirhash.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?200203111913.g2BJDMs78114>