[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ext2 file system: moving between armel and amd64 etc.


On Mon, Oct 26, 2009 at 04:07:58PM +0200, Riku Voipio wrote:
> Hi Osamu,
> On Mon, Oct 26, 2009 at 09:25:36PM +0900, Osamu Aoki wrote:
> > I realized that mkfs.ext2 creates different superblock depending on which
> > system it is run under.  The difference can be observed by tune2fs -l:
> > 
> >  ext2 created by Debian lenny on amd64: 
> >   Filesystem flags: signed_directory_hash
> > 
> >  ext2 created by Ubuntu 09.4 armel: 
> >   Filesystem flags: unsigned_directory_hash 
> > 
> > It seems it comes from the fact that armel uses unsigned for char.

I should have put some reference why I said it.  This was because of
Ted's patch.
> Ted, can you check if e2fsprogs expects signed char in the code that
> checks for signed directory hash?

I can see http://patchwork.kernel.org/patch/22568/ (2009-05-08 11:58:01) has:

From: Theodore Ts'o <tytso@mit.edu>

The original ext3 hash algorithms assumed that variables of type char
were signed, as God and K&R intended.  Unfortunately, this assumption
is not true on some architectures.  Userspace support for marking
filesystems with non-native signed/unsigned chars was added two years
ago, but the kernel-side support was never added (until now).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org

> > Since kernel support of this flag is new and lenny or jaunty one seems
> > to ignore it, I could move file between these 2 system.  (I do fsck -p
> > to get hash fixed every time I move, first.)  So it works now but this
> > is sloppy.
> > 
> > What is the right tool to change this "Filesystem flags" setting.  I do
> > not see in lenny or jaunty.  Can new tune2fs adjust this parameter?
> > What is the right way to move ext2 filesystem between system? 
> Rather, lets try to get it fixed instead. There should be no reason
> to run tune2fs when moving a filesystem from armel to x86 machine.

With newer patched kernels after 2009-05-08 11:58:01, I expect this is
handled well.  But now we do fsck in one environment without changing
this signed/unsigned flag.  By doind so will make filesystem to be fsck
clean but not matching signed/unsigned flag.

This is why I asked how you have been dealing this situation as porters.

> > PS: I am playing with Sharp PC-Z1.  
> >   http://wiki.debian.org/InstallingDebianOn/Sharp/PC-Z1NetWalker
> Seems like a very interesting device :)

Yes.  It is my toy.

Since this is almost like PC with USB and microSD card, I am tempted to
format them in ext2.

Reply to: