From: Eric Sandeen <sandeen@sandeen.net>
To: David Chinner <dgc@sgi.com>
Cc: xfs-dev <xfs-dev@sgi.com>, xfs-oss <xfs@oss.sgi.com>
Subject: Re: [patch] detect and correct bad features2 superblock field
Date: Sat, 29 Mar 2008 20:49:12 -0500 [thread overview]
Message-ID: <47EEF198.2060409@sandeen.net> (raw)
In-Reply-To: <47EEED18.9090206@sandeen.net>
Eric Sandeen wrote:
> Hm, the other problem here may be that if we zero bad_features2, then
> any older kernel will mount up as attr2... and run into the corruption
> problem I found on F8...
>
Er, as attr1
> Should we make features2 and bad_features2 match rather than zeroing
> bad_features2?
>
Maybe like this...? Though I suppose there's still a minor issue
with older tools modifying flags...
diff -u linux-2.6.24.x86_64/fs/xfs/xfs_sb.h linux-2.6.24.x86_64/fs/xfs/xfs_sb.h
--- linux-2.6.24.x86_64/fs/xfs/xfs_sb.h
+++ linux-2.6.24.x86_64/fs/xfs/xfs_sb.h
@@ -325,7 +325,7 @@
*/
static inline int xfs_sb_has_bad_features2(xfs_sb_t *sbp)
{
- return (sbp->sb_bad_features2 != 0);
+ return (sbp->sb_features2 != sbp->sb_bad_features2);
}
#define XFS_SB_VERSION_TONEW(v) xfs_sb_version_tonew(v)
diff -u linux-2.6.24.x86_64/fs/xfs/xfs_mount.c linux-2.6.24.x86_64/fs/xfs/xfs_mount.c
--- linux-2.6.24.x86_64/fs/xfs/xfs_mount.c
+++ linux-2.6.24.x86_64/fs/xfs/xfs_mount.c
@@ -994,7 +994,7 @@
cmn_err(CE_WARN,
"XFS: correcting sb_features alignment problem");
sbp->sb_features2 |= sbp->sb_bad_features2;
- sbp->sb_bad_features2 = 0;
+ sbp->sb_bad_features2 = sbp->sb_features2;
update_flags |= XFS_SB_FEATURES2 | XFS_SB_BAD_FEATURES2;
}
next prev parent reply other threads:[~2008-03-30 1:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-20 5:40 [patch] detect and correct bad features2 superblock field David Chinner
2008-02-20 14:09 ` Eric Sandeen
2008-02-20 19:13 ` Christoph Hellwig
2008-02-21 22:49 ` David Chinner
2008-03-29 3:25 ` Eric Sandeen
2008-03-29 16:19 ` Eric Sandeen
2008-03-30 1:30 ` Eric Sandeen
2008-03-30 1:49 ` Eric Sandeen [this message]
2008-03-30 4:50 ` Josef 'Jeff' Sipek
2008-03-30 4:53 ` Eric Sandeen
2008-03-30 5:29 ` Josef 'Jeff' Sipek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47EEF198.2060409@sandeen.net \
--to=sandeen@sandeen.net \
--cc=dgc@sgi.com \
--cc=xfs-dev@sgi.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox