From owner-freebsd-bugs@FreeBSD.ORG Wed Oct 23 09:40:05 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C4A4A64B for ; Wed, 23 Oct 2013 09:40:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8B8572093 for ; Wed, 23 Oct 2013 09:40:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r9N9e5oe089097 for ; Wed, 23 Oct 2013 09:40:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r9N9e5wE089096; Wed, 23 Oct 2013 09:40:05 GMT (envelope-from gnats) Resent-Date: Wed, 23 Oct 2013 09:40:05 GMT Resent-Message-Id: <201310230940.r9N9e5wE089096@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Grzegorz Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 303C863C for ; Wed, 23 Oct 2013 09:39:38 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1DA032065 for ; Wed, 23 Oct 2013 09:39:38 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r9N9dbKu015489 for ; Wed, 23 Oct 2013 09:39:37 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r9N9dbgC015488; Wed, 23 Oct 2013 09:39:37 GMT (envelope-from nobody) Message-Id: <201310230939.r9N9dbgC015488@oldred.freebsd.org> Date: Wed, 23 Oct 2013 09:39:37 GMT From: Grzegorz To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: misc/183230: ext2fs hash function incompatible with linux X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Oct 2013 09:40:05 -0000 >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: