tune2fs,resize2fs: special case HURD only when testing s_creator_os

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>
debian
Theodore Ts'o 2016-06-07 11:47:40 -04:00
parent 43b7b054cd
commit 81f965a04d
2 changed files with 2 additions and 2 deletions

View 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);

View 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);