diff options
author | Tim Shimmin <tes@sgi.com> | 2008-04-30 04:15:28 -0400 |
---|---|---|
committer | Niv Sardi <xaiki@debian.org> | 2008-07-28 02:58:05 -0400 |
commit | 7c12f296500e1157872ef45b3f3bb06b4b73f1c1 (patch) | |
tree | d6737b8ee2775ff70a1a7b5c77a4c25b3423bada /fs/xfs/xfs_vfsops.c | |
parent | f9f6dce01905179d9a209cc1e69fe9047736c112 (diff) |
[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>
Diffstat (limited to 'fs/xfs/xfs_vfsops.c')
-rw-r--r-- | fs/xfs/xfs_vfsops.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index 30bacd8bb0e5..bbc911720d81 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c | |||
@@ -284,6 +284,8 @@ xfs_start_flags( | |||
284 | mp->m_flags |= XFS_MOUNT_DIRSYNC; | 284 | mp->m_flags |= XFS_MOUNT_DIRSYNC; |
285 | if (ap->flags & XFSMNT_ATTR2) | 285 | if (ap->flags & XFSMNT_ATTR2) |
286 | mp->m_flags |= XFS_MOUNT_ATTR2; | 286 | mp->m_flags |= XFS_MOUNT_ATTR2; |
287 | if (ap->flags & XFSMNT_NOATTR2) | ||
288 | mp->m_flags |= XFS_MOUNT_NOATTR2; | ||
287 | 289 | ||
288 | if (ap->flags2 & XFSMNT2_COMPAT_IOSIZE) | 290 | if (ap->flags2 & XFSMNT2_COMPAT_IOSIZE) |
289 | mp->m_flags |= XFS_MOUNT_COMPAT_IOSIZE; | 291 | mp->m_flags |= XFS_MOUNT_COMPAT_IOSIZE; |
@@ -346,7 +348,12 @@ xfs_finish_flags( | |||
346 | } | 348 | } |
347 | } | 349 | } |
348 | 350 | ||
349 | if (xfs_sb_version_hasattr2(&mp->m_sb)) | 351 | /* |
352 | * mkfs'ed attr2 will turn on attr2 mount unless explicitly | ||
353 | * told by noattr2 to turn it off | ||
354 | */ | ||
355 | if (xfs_sb_version_hasattr2(&mp->m_sb) && | ||
356 | !(ap->flags & XFSMNT_NOATTR2)) | ||
350 | mp->m_flags |= XFS_MOUNT_ATTR2; | 357 | mp->m_flags |= XFS_MOUNT_ATTR2; |
351 | 358 | ||
352 | /* | 359 | /* |