From 81f965a04df5053d2c4bf6ad33b97c4fdc7bfb90 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 7 Jun 2016 11:47:40 -0400 Subject: [PATCH] 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 --- misc/tune2fs.c | 2 +- resize/resize2fs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/tune2fs.c b/misc/tune2fs.c index 8562de6..d27d94b 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -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); diff --git a/resize/resize2fs.c b/resize/resize2fs.c index b94d439..09419ce 100644 --- a/resize/resize2fs.c +++ b/resize/resize2fs.c @@ -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); -- 1.8.3.1