From owner-freebsd-bugs Wed Nov 14 5: 0:15 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id C5EFE37B61A for ; Wed, 14 Nov 2001 05:00:10 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fAED0Ae43858; Wed, 14 Nov 2001 05:00:10 -0800 (PST) (envelope-from gnats) Date: Wed, 14 Nov 2001 05:00:10 -0800 (PST) Message-Id: <200111141300.fAED0Ae43858@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Ian Dowse Subject: Re: kern/31966: `offset == dh->dh_seqopt' in ufsdirhash_lookup() is wrong? Reply-To: Ian Dowse Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR kern/31966; it has been noted by GNATS. From: Ian Dowse To: KOIE Hidetaka 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