public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@clusterfs.com>
To: Theodore Tso <tytso@mit.edu>
Cc: "J�rg Sommer" <joerg@alea.gnuu.de>,
	389772@bugs.debian.org, paulus@au.ibm.com,
	linux-ext4@vger.kernel.org
Subject: Re: Bug#389772: e2fsprogs: e2fsck produces broken htree on ppc
Date: Fri, 29 Sep 2006 11:15:47 -0600	[thread overview]
Message-ID: <20060929171547.GO22010@schatzie.adilger.int> (raw)
In-Reply-To: <20060929010857.GC11055@thunk.org>

On Sep 28, 2006  21:08 -0400, Theodore Tso wrote:
> On Wed, Sep 27, 2006 at 02:22:51PM +0200, Jörg Sommer wrote:
> > Package: e2fsprogs
> > Version: 1.39-1
> > Severity: important
> > 
> > you set the compiler option -fsigned-char, but on PowerPC the default is
> > unsigned char. This makes the kernel uses unsigned and e2fsck uses signed
> > chars.
> > 
> > In the case of an 8 bit character, str2hashbuf() in lib/ext2fs/dirhash.c
> > produces a different buf than the kernel, which leads to the problem that
> > the hash calculated by TEA_transform() is a different one.
> 
> Oh, dear.  This is actually a kernel bug, because the on all other
> platforms, the TEA hash will be using a signed char --- and if you
> want filesystems to be portable between different systems (hint: we
> do), then all architectures should be using the same algorithm.  And
> the vast majority of the systems out there are using signed chars.
> Unfortunately PowerPC decided to be different.  :-(
> 
> But given that e2fsck is doing it right, and the kernel is doing it
> wrong, we have the mismatch already.  Sigh, this is going to be
> especially painful, given that all the major distributions (SLES,
> RHEL, Debian, Ubuntu, etc.) are now shipping with directory hashing
> enabled by default, and so this is going to impact a huge number of
> PowerPC Linux users and customers.

Hmm, except isn't the problem ALREADY that PPC is broken with 8-bit
chars and htree?  That's what started this problem in the first place.
Running e2fsck allowed the kernel htree code to find the file, when
it could not otherwise be looked up...  Need to verify that (my mental
stack is overflowing).

IIRC this problem was also reported in the past but no solution was found.
I think fixing the kernel to specify signed chars for the hash will FIX
the PPC kernel code.

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2006-09-29 17:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060927122251.GA732@alea.gnuu.de>
2006-09-29  1:08 ` Bug#389772: e2fsprogs: e2fsck produces broken htree on ppc Theodore Tso
2006-09-29 17:15   ` Andreas Dilger [this message]
2006-09-29 21:15     ` Theodore Tso
2006-09-30 23:57       ` Jörg Sommer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060929171547.GO22010@schatzie.adilger.int \
    --to=adilger@clusterfs.com \
    --cc=389772@bugs.debian.org \
    --cc=joerg@alea.gnuu.de \
    --cc=linux-ext4@vger.kernel.org \
    --cc=paulus@au.ibm.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox