Whamcloud - gitweb
Add directory hashed signed/unsigned hint to superblock
authorTheodore Ts'o <tytso@mit.edu>
Sun, 12 Nov 2006 03:32:35 +0000 (22:32 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 12 Nov 2006 03:32:35 +0000 (22:32 -0500)
commitf77704e416fca7dbe4cc91abba674d2ae3c14f6f
tree1a927102301da898881d0dc788d493381f61f463
parent52325593b1979509dc3f18232b50359e311268cc
Add directory hashed signed/unsigned hint to superblock

The e2fsprogs and kernel implementation of directory hash tree has a
bug which causes the implementation to be dependent on whether
characters are signed or unsigned.  Platforms such as the PowerPC,
Arm, and S/390 have signed characters by default, which means that
hash directories on those systems are incompatible with hash
directories on other systems, such as the x86.

To fix this we add a new flags field to the superblock, and define two
new bits in that field to indicate whether or not the directory should
be signed or unsigned.  If the bits are not set, e2fsck and fixed
kernels will set them to the signed/unsigned value of the currently
running platform, and then respect those bits when calculating the
directory hash.  This allows compatibility with current filesystems,
as well as allowing cross-architectural compatibility.

Addresses Debian Bug: #389772

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
32 files changed:
debian/rules
debugfs/ChangeLog
debugfs/htree.c
debugfs/set_fields.c
e2fsck/ChangeLog
e2fsck/pass2.c
e2fsck/problem.c
e2fsck/problem.h
e2fsck/rehash.c
e2fsck/super.c
lib/e2p/ChangeLog
lib/e2p/ls.c
lib/ext2fs/ChangeLog
lib/ext2fs/dirhash.c
lib/ext2fs/ext2_fs.h
lib/ext2fs/initialize.c
lib/ext2fs/swapfs.c
tests/ChangeLog
tests/f_dup_de/image.gz
tests/f_h_badnode/image.gz
tests/f_h_badroot/image.gz
tests/f_h_normal/expect.1
tests/f_h_normal/expect.2
tests/f_h_normal/image.gz
tests/f_h_normal/name
tests/f_h_reindex/image.gz
tests/f_h_unsigned/expect.1 [new file with mode: 0644]
tests/f_h_unsigned/expect.2 [new file with mode: 0644]
tests/f_h_unsigned/image.gz [new file with mode: 0644]
tests/f_h_unsigned/name [new file with mode: 0644]
tests/f_h_unsigned/script [new file with mode: 0644]
tests/filter_dumpe2fs