From owner-freebsd-bugs Tue Nov 13 20:40: 8 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 237BC37B417 for ; Tue, 13 Nov 2001 20:40:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fAE4e1u14448; Tue, 13 Nov 2001 20:40:01 -0800 (PST) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id E155737B416 for ; Tue, 13 Nov 2001 20:39:10 -0800 (PST) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fAE4dAD14339; Tue, 13 Nov 2001 20:39:10 -0800 (PST) (envelope-from nobody) Message-Id: <200111140439.fAE4dAD14339@freefall.freebsd.org> Date: Tue, 13 Nov 2001 20:39:10 -0800 (PST) From: KOIE Hidetaka To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/31966: `offset == dh->dh_seqopt' in ufsdirhash_lookup() is wrong? 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 >Number: 31966 >Category: kern >Synopsis: `offset == dh->dh_seqopt' in ufsdirhash_lookup() is wrong? >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Nov 13 20:40:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: KOIE Hidetaka >Release: NONE >Organization: SURIGIKEN >Environment: NONE >Description: 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 for (i = slot; (offset = DH_ENTRY(dh, i)) != DIRHASH_EMPTY; i = WRAPINCR(i, dh->dh_hlen)) if (offset == dh->dh_seqopt) break; if (offset == dh->dh_seqoff) { slot = i; } else dh->dh_seqopt = 0; } should be ... if (offset == dh->dh_seqoff) break; ... >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message