public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: Andreas Dilger <adilger@clusterfs.com>
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 17:15:56 -0400	[thread overview]
Message-ID: <20060929211556.GA11017@thunk.org> (raw)
In-Reply-To: <20060929171547.GO22010@schatzie.adilger.int>

On Fri, Sep 29, 2006 at 11:15:47AM -0600, Andreas Dilger wrote:
> 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.

If the filesystem is empty (or at least no no hashtree directories),
then when the kernel creates new directories and expands to the point
where they become indexed, they will be indexed with the PPC variant
of the hash algorithm.  This will be self consistent, and everything
will work fine --- until the filesystem gets corrupted to the point
where e2fsprogs needs to rebuild one or more hashed directories.  At
that point the directories will be rebuilt using the same conventions
used by all other conventions, but the directories will no longer be
useful on the PPC kernel.

Joerg, can you confirm this?  On a PPC machine, can you create a
smallish ext3 filesystem (say, 4-8 megabytes), create a directory with
enough files in it that it becomes indexed (verify using lsattr), and
show that it works just fine on a PPC.  Now take that image, and
transfer it to an x86 machine; you should find that the kernel can't
look up any of the directories on the x86 machine.  If you then run
e2fsck -fD on that filesystem (running the e2fsck on either x86 or
PPC; it shouldn't make a difference), then the resulting filesystem
should work just fine on the x86, and fail on the PPC.

If I understand this problem correctly, the above experiment should
confirm what I suspect is going on.

						- Ted

  reply	other threads:[~2006-09-29 21:16 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
2006-09-29 21:15     ` Theodore Tso [this message]
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=20060929211556.GA11017@thunk.org \
    --to=tytso@mit.edu \
    --cc=389772@bugs.debian.org \
    --cc=adilger@clusterfs.com \
    --cc=joerg@alea.gnuu.de \
    --cc=linux-ext4@vger.kernel.org \
    --cc=paulus@au.ibm.com \
    /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