RHEL e2fsprogs-1.40.4-sb_feature_check_ignore.patch
I was looking through the RHEL e2fsprogs.spec file and saw that you are still
carrying the e2fsprogs-1.40.4-sb_feature_check_ignore.patch to avoid problems
if the kernel sets xattrs on a new filesystem and doesn't copy this into the
backup superblock.
It seems that mke2fs enables the xattr feature in the superblock by default for all filesystems (courtesy of misc/default_profile.c), and e2fsck doesn't
drop COMPAT_EXT_XATTR even if the filesystem doesn't have xattrs, so most of
the danger of not having this patch are behind us.
That said, it probably still makes sense to include this patch into the upstream e2fsprogs, unless there is some reason not to? It looks pretty low risk.
Cheers, Andreas
Signature · 4 lines
Andreas Dilger Lustre Software Architect Intel High Performance Data Division
e2fsck/super.c +4 -0
@@ -869,7 +869,11 @@ void check_super_block(e2fsck_t ctx)* unfortunately, we shouldn't ignore it since if it's not set in the * backup, the extended attributes in the filesystem will be stripped * away. +* +* Well, I'm still going that route for now, 'til I do something +* better. Full-fsck after a fresh install is just no good. -ERS */ +#define FEATURE_COMPAT_IGNORE (EXT2_FEATURE_COMPAT_EXT_ATTR)#define FEATURE_RO_COMPAT_IGNORE (EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \ EXT4_FEATURE_RO_COMPAT_DIR_NLINK)#define FEATURE_INCOMPAT_IGNORE
(EXT3_FEATURE_INCOMPAT_EXTENTS| \
@@ -921,6 +925,9 @@ int check_backup_super_block(e2fsck_t ct
(EXT2_INODE_SIZE(backup_sb) < EXT2_GOOD_OLD_INODE_SIZE)) continue;
+#define SUPER_COMPAT_DIFFERENT(x) \
+ ((fs->super->x & ~FEATURE_COMPAT_IGNORE) != \
+ (backup_sb->x & ~FEATURE_COMPAT_IGNORE))
#define SUPER_INCOMPAT_DIFFERENT(x) \
((fs->super->x & ~FEATURE_INCOMPAT_IGNORE) != \
(backup_sb->x & ~FEATURE_INCOMPAT_IGNORE))
Quoted 7 lines · Andreas
I was looking through the RHEL e2fsprogs.spec file and saw that you are still
carrying the e2fsprogs-1.40.4-sb_feature_check_ignore.patch to avoid problems
if the kernel sets xattrs on a new filesystem and doesn't copy this into the
backup superblock.
Ugh, yeah, that's just been there forever, TBH, I forgot about it. I'll actually have to refamiliarize myself with why it showed up years ago! :)
Quoted 10 lines
It seems that mke2fs enables the xattr feature in the superblock by default for all filesystems (courtesy of
misc/default_profile.c), and e2fsck doesn't
dropCOMPAT_EXT_XATTReven if the filesystem doesn't have xattrs, so most of
the danger of not having this patch are behind us.That said, it probably still makes sense to include this patch into the upstream e2fsprogs, unless there is some reason not to? It looks pretty low risk.
Well, ISTR at the time I added it, it was a hacky workaround, rather than a proper fix. I'll have to look at it again.
-eric
Quoted 2 lines
Cheers, Andreas