linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RHEL e2fsprogs-1.40.4-sb_feature_check_ignore.patch
@ 2014-07-18 19:50 Dilger, Andreas
  2014-07-18 22:32 ` Eric Sandeen
  0 siblings, 1 reply; 2+ messages in thread
From: Dilger, Andreas @ 2014-07-18 19:50 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: linux-ext4@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 819 bytes --]

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
-- 
Andreas Dilger

Lustre Software Architect
Intel High Performance Data Division



[-- Attachment #2: e2fsprogs-1.40.4-sb_feature_check_ignore.patch --]
[-- Type: application/octet-stream, Size: 1196 bytes --]

Index: e2fsprogs-1.41.5/e2fsck/super.c
===================================================================
--- e2fsprogs-1.41.5.orig/e2fsck/super.c
+++ e2fsprogs-1.41.5/e2fsck/super.c
@@ -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))

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: RHEL e2fsprogs-1.40.4-sb_feature_check_ignore.patch
  2014-07-18 19:50 RHEL e2fsprogs-1.40.4-sb_feature_check_ignore.patch Dilger, Andreas
@ 2014-07-18 22:32 ` Eric Sandeen
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Sandeen @ 2014-07-18 22:32 UTC (permalink / raw)
  To: Dilger, Andreas; +Cc: linux-ext4@vger.kernel.org

On 7/18/14, 2:50 PM, Dilger, Andreas wrote:
> 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!  :)

> 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.

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
 
> Cheers, Andreas
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-18 22:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-18 19:50 RHEL e2fsprogs-1.40.4-sb_feature_check_ignore.patch Dilger, Andreas
2014-07-18 22:32 ` Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).