diff options
author | Dave Chinner <dchinner@redhat.com> | 2014-05-19 17:41:43 -0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-05-19 17:41:43 -0400 |
commit | 32bf1deae15b67839a2f0cb233254125be73fc78 (patch) | |
tree | 9d98b04f02e5f42e4e8861de7107e6089732a227 /fs/xfs | |
parent | f68a373525d26d1cd7920f9d5dbf0d3aa1b9b889 (diff) |
xfs: keep sb_bad_features2 the same a sb_features2
Whenever we update sb_features2, we need to update sb_bad_features2
so that they remain identical on disk. This prevents future mounts
or userspace utilities from getting confused over which features the
filesystem supports.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_sb.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_sb.h b/fs/xfs/xfs_sb.h index 57f6ba13d19f..a6a76f41aad2 100644 --- a/fs/xfs/xfs_sb.h +++ b/fs/xfs/xfs_sb.h | |||
@@ -468,11 +468,13 @@ static inline void xfs_sb_version_addattr2(struct xfs_sb *sbp) | |||
468 | { | 468 | { |
469 | sbp->sb_versionnum |= XFS_SB_VERSION_MOREBITSBIT; | 469 | sbp->sb_versionnum |= XFS_SB_VERSION_MOREBITSBIT; |
470 | sbp->sb_features2 |= XFS_SB_VERSION2_ATTR2BIT; | 470 | sbp->sb_features2 |= XFS_SB_VERSION2_ATTR2BIT; |
471 | sbp->sb_bad_features2 |= XFS_SB_VERSION2_ATTR2BIT; | ||
471 | } | 472 | } |
472 | 473 | ||
473 | static inline void xfs_sb_version_removeattr2(struct xfs_sb *sbp) | 474 | static inline void xfs_sb_version_removeattr2(struct xfs_sb *sbp) |
474 | { | 475 | { |
475 | sbp->sb_features2 &= ~XFS_SB_VERSION2_ATTR2BIT; | 476 | sbp->sb_features2 &= ~XFS_SB_VERSION2_ATTR2BIT; |
477 | sbp->sb_bad_features2 &= ~XFS_SB_VERSION2_ATTR2BIT; | ||
476 | if (!sbp->sb_features2) | 478 | if (!sbp->sb_features2) |
477 | sbp->sb_versionnum &= ~XFS_SB_VERSION_MOREBITSBIT; | 479 | sbp->sb_versionnum &= ~XFS_SB_VERSION_MOREBITSBIT; |
478 | } | 480 | } |