[XFS] Fix up noattr2 so that it will properly update the versionnum and
features2 fields. Previously, mounting with noattr2 failed to achieve anything because although it cleared the attr2 mount flag, it would set it again as soon as it processed the superblock fields. The fix now has an explicit noattr2 flag and uses it later to fix up the versionnum and features2 fields. SGI-PV: 980021 SGI-Modid: xfs-linux-melb:xfs-kern:31003a Signed-off-by: Tim Shimmin <tes@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
This commit is contained in:
@@ -284,6 +284,8 @@ xfs_start_flags(
|
||||
mp->m_flags |= XFS_MOUNT_DIRSYNC;
|
||||
if (ap->flags & XFSMNT_ATTR2)
|
||||
mp->m_flags |= XFS_MOUNT_ATTR2;
|
||||
if (ap->flags & XFSMNT_NOATTR2)
|
||||
mp->m_flags |= XFS_MOUNT_NOATTR2;
|
||||
|
||||
if (ap->flags2 & XFSMNT2_COMPAT_IOSIZE)
|
||||
mp->m_flags |= XFS_MOUNT_COMPAT_IOSIZE;
|
||||
@@ -346,7 +348,12 @@ xfs_finish_flags(
|
||||
}
|
||||
}
|
||||
|
||||
if (xfs_sb_version_hasattr2(&mp->m_sb))
|
||||
/*
|
||||
* mkfs'ed attr2 will turn on attr2 mount unless explicitly
|
||||
* told by noattr2 to turn it off
|
||||
*/
|
||||
if (xfs_sb_version_hasattr2(&mp->m_sb) &&
|
||||
!(ap->flags & XFSMNT_NOATTR2))
|
||||
mp->m_flags |= XFS_MOUNT_ATTR2;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user