Date: Wed, 14 Nov 2001 05:00:10 -0800 (PST) From: Ian Dowse <iedowse@maths.tcd.ie> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/31966: `offset == dh->dh_seqopt' in ufsdirhash_lookup() is wrong? Message-ID: <200111141300.fAED0Ae43858@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/31966; it has been noted by GNATS. From: Ian Dowse <iedowse@maths.tcd.ie> To: KOIE Hidetaka <koie@suri.co.jp> Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: kern/31966: `offset == dh->dh_seqopt' in ufsdirhash_lookup() is wrong? Date: Wed, 14 Nov 2001 12:51:03 +0000 In message <200111140439.fAE4dAD14339@freefall.freebsd.org>, KOIE Hidetaka writ es: >I'm not using FreeBSD. >I'm reading DIRHASH codes to study. I'm looking ufs_dirhash.c rev 1.6. >The function ufsdirhash_lookup() has `Sequential access optimisation'. >I suppose that ... > if (offset == dh->dh_seqopt) ... >should be ... > if (offset == dh->dh_seqoff) ... Oops, you are quite correct. This typo effectively disabled the sequential access optimisation entirely. I think apart from this, the bug was not harmful (the case where this code runs is where dh->dh_seqopt == 1, but no valid UFS directory can exist at offset 1, so `offset' will never be 1). I will commit your proposed fix as soon as I have done a bit of testing. Thank you, KOIE-san, for finding this and pointing it out! Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111141300.fAED0Ae43858>