aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_sb.h
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2008-04-09 22:19:34 -0400
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-04-10 02:25:26 -0400
commite6957ea48429aeda4f5d51af4238231d44b0dc4a (patch)
tree860c95c0e9446191262bb44ad436d38afb8cb7d6 /fs/xfs/xfs_sb.h
parentee1c090825bf2f1cb9712489c234eabf69a9a78f (diff)
[XFS] Ensure "both" features2 slots are consistent
Since older kernels may look in the sb_bad_features2 slot for flags, rather than zeroing it out on fixup, we should make it equal to the sb_features2 value. Also, if the ATTR2 flag was not found prior to features2 fixup, it was not set in the mount flags, so re-check after the fixup so that the current session will use the feature. Also fix up the comments to reflect these changes. SGI-PV: 980085 SGI-Modid: xfs-linux-melb:xfs-kern:30778a Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_sb.h')
-rw-r--r--fs/xfs/xfs_sb.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/xfs/xfs_sb.h b/fs/xfs/xfs_sb.h
index b1a83f8ec044..d904efe7f871 100644
--- a/fs/xfs/xfs_sb.h
+++ b/fs/xfs/xfs_sb.h
@@ -320,11 +320,12 @@ static inline int xfs_sb_good_version(xfs_sb_t *sbp)
320#endif /* __KERNEL__ */ 320#endif /* __KERNEL__ */
321 321
322/* 322/*
323 * Detect a bad features2 field 323 * Detect a mismatched features2 field. Older kernels read/wrote
324 * this into the wrong slot, so to be safe we keep them in sync.
324 */ 325 */
325static inline int xfs_sb_has_bad_features2(xfs_sb_t *sbp) 326static inline int xfs_sb_has_mismatched_features2(xfs_sb_t *sbp)
326{ 327{
327 return (sbp->sb_bad_features2 != 0); 328 return (sbp->sb_bad_features2 != sbp->sb_features2);
328} 329}
329 330
330static inline unsigned xfs_sb_version_tonew(unsigned v) 331static inline unsigned xfs_sb_version_tonew(unsigned v)