diff options
author | Christoph Hellwig <hch@infradead.org> | 2007-08-30 03:21:12 -0400 |
---|---|---|
committer | Tim Shimmin <tes@chook.melbourne.sgi.com> | 2007-10-15 21:45:57 -0400 |
commit | bd186aa901c183d6e25257711b6c64b42a90dde0 (patch) | |
tree | a84157145a249923a79276d7bc9170701b100c43 /fs/xfs/xfs_log.c | |
parent | 0ce4cfd4f7dde5891d5b3e3c1a28ff7a7b4d36b3 (diff) |
[XFS] kill the vfs_flags member in struct bhv_vfs
All flags are added to xfs_mount's m_flag instead. Note that the 32bit
inode flag was duplicated in both of them, but only cleared in the mount
when it was not nessecary due to the filesystem beeing small enough. Two
flags are still required here - one to indicate the mount option setting,
and one to indicate if it applies or not.
SGI-PV: 969608
SGI-Modid: xfs-linux-melb:xfs-kern:29507a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r-- | fs/xfs/xfs_log.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 4f4d20b2721c..d170fffd7402 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
@@ -486,7 +486,7 @@ xfs_log_mount(xfs_mount_t *mp, | |||
486 | cmn_err(CE_NOTE, | 486 | cmn_err(CE_NOTE, |
487 | "!Mounting filesystem \"%s\" in no-recovery mode. Filesystem will be inconsistent.", | 487 | "!Mounting filesystem \"%s\" in no-recovery mode. Filesystem will be inconsistent.", |
488 | mp->m_fsname); | 488 | mp->m_fsname); |
489 | ASSERT(XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY); | 489 | ASSERT(mp->m_flags & XFS_MOUNT_RDONLY); |
490 | } | 490 | } |
491 | 491 | ||
492 | mp->m_log = xlog_alloc_log(mp, log_target, blk_offset, num_bblks); | 492 | mp->m_log = xlog_alloc_log(mp, log_target, blk_offset, num_bblks); |
@@ -496,16 +496,15 @@ xfs_log_mount(xfs_mount_t *mp, | |||
496 | * just worked. | 496 | * just worked. |
497 | */ | 497 | */ |
498 | if (!(mp->m_flags & XFS_MOUNT_NORECOVERY)) { | 498 | if (!(mp->m_flags & XFS_MOUNT_NORECOVERY)) { |
499 | bhv_vfs_t *vfsp = XFS_MTOVFS(mp); | 499 | int error, readonly = (mp->m_flags & XFS_MOUNT_RDONLY); |
500 | int error, readonly = (vfsp->vfs_flag & VFS_RDONLY); | ||
501 | 500 | ||
502 | if (readonly) | 501 | if (readonly) |
503 | vfsp->vfs_flag &= ~VFS_RDONLY; | 502 | mp->m_flags &= ~XFS_MOUNT_RDONLY; |
504 | 503 | ||
505 | error = xlog_recover(mp->m_log); | 504 | error = xlog_recover(mp->m_log); |
506 | 505 | ||
507 | if (readonly) | 506 | if (readonly) |
508 | vfsp->vfs_flag |= VFS_RDONLY; | 507 | mp->m_flags |= XFS_MOUNT_RDONLY; |
509 | if (error) { | 508 | if (error) { |
510 | cmn_err(CE_WARN, "XFS: log mount/recovery failed: error %d", error); | 509 | cmn_err(CE_WARN, "XFS: log mount/recovery failed: error %d", error); |
511 | xlog_dealloc_log(mp->m_log); | 510 | xlog_dealloc_log(mp->m_log); |
@@ -537,7 +536,7 @@ xfs_log_mount_finish(xfs_mount_t *mp, int mfsi_flags) | |||
537 | error = xlog_recover_finish(mp->m_log, mfsi_flags); | 536 | error = xlog_recover_finish(mp->m_log, mfsi_flags); |
538 | else { | 537 | else { |
539 | error = 0; | 538 | error = 0; |
540 | ASSERT(XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY); | 539 | ASSERT(mp->m_flags & XFS_MOUNT_RDONLY); |
541 | } | 540 | } |
542 | 541 | ||
543 | return error; | 542 | return error; |
@@ -597,7 +596,7 @@ xfs_log_unmount_write(xfs_mount_t *mp) | |||
597 | * Don't write out unmount record on read-only mounts. | 596 | * Don't write out unmount record on read-only mounts. |
598 | * Or, if we are doing a forced umount (typically because of IO errors). | 597 | * Or, if we are doing a forced umount (typically because of IO errors). |
599 | */ | 598 | */ |
600 | if (XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY) | 599 | if (mp->m_flags & XFS_MOUNT_RDONLY) |
601 | return 0; | 600 | return 0; |
602 | 601 | ||
603 | xfs_log_force(mp, 0, XFS_LOG_FORCE|XFS_LOG_SYNC); | 602 | xfs_log_force(mp, 0, XFS_LOG_FORCE|XFS_LOG_SYNC); |