]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
tune2fs,resize2fs: special case HURD only when testing s_creator_os
authorTheodore Ts'o <tytso@mit.edu>
Tue, 7 Jun 2016 15:47:40 +0000 (11:47 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 7 Jun 2016 15:47:40 +0000 (11:47 -0400)
The s_creator_os field was a mistake, given how Hurd has been
ab(using) certain file system fields.  We should skip support for
certain advanced features (64-bit support, metadata checksums) for
file systems created on the Hurd OS only, instead of only supporting
them for file systems created on Linux.  This fixes various regression
test failures for FreeBSD.

(The regression tests are probably mostly hopeless for Hurd anyway,
but given the HURD abuse's of various file system fields, the HURD is
going to have to be given second-class treatment in any case, given
what they decided to do with ext2 support, which locks them out of the
more advanced file system features, anyway.)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/tune2fs.c
resize/resize2fs.c

index 8562de6d9bde19b31cc06538af31299e986ac202..d27d94b03fd690e6b5e73d533b787dcb33d9d378 100644 (file)
@@ -729,7 +729,7 @@ static void rewrite_inodes(ext2_filsys fs)
        blk64_t         file_acl_block;
        int             inode_dirty;
 
-       if (fs->super->s_creator_os != EXT2_OS_LINUX)
+       if (fs->super->s_creator_os == EXT2_OS_HURD)
                return;
 
        retval = ext2fs_open_inode_scan(fs, 0, &scan);
index b94d439bb3e3829cf1f00848a9eeaaac78c7df32..09419ce49348dc382747479013833de83b50f583 100644 (file)
@@ -521,7 +521,7 @@ static errcode_t zero_high_bits_in_inodes(ext2_resize_t rfs)
        if (!(rfs->flags & (RESIZE_DISABLE_64BIT | RESIZE_ENABLE_64BIT)))
                return 0;
 
-       if (fs->super->s_creator_os != EXT2_OS_LINUX)
+       if (fs->super->s_creator_os == EXT2_OS_HURD)
                return 0;
 
        retval = ext2fs_open_inode_scan(fs, 0, &scan);