Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Oct 2013 09:39:37 GMT
From:      Grzegorz <kostka.grzegorz@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/183230: ext2fs hash function incompatible with linux
Message-ID:  <201310230939.r9N9dbgC015488@oldred.freebsd.org>
Resent-Message-ID: <201310230940.r9N9e5wE089096@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         183230
>Category:       misc
>Synopsis:       ext2fs hash function incompatible with linux
>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:   Wed Oct 23 09:40:05 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Grzegorz
>Release:        9
>Organization:
.
>Environment:
.
>Description:
Hi,


probably I found a bug. Half md4 hash output value is assigned to hash and hash_minor. Linux fsck reports problems (HTREE max value is wrong) on ext partition with a lot directory entries.

FreeBSD implementation:
http://fxr.watson.org/fxr/source/fs/ext2fs/ext2_hash.c?v=FREEBSD9#L242

Linux implementation:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/fs/ext3/hash.c

Look EXT2_HTREE_HALF_MD4:

FreeBSD:
major = hash[0];
minor = hash[1];

Linux:
minor_hash = buf[2];
hash = buf[1];



>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310230939.r9N9dbgC015488>