diff options
author | Dave Chinner <dchinner@redhat.com> | 2012-10-08 06:56:00 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-10-17 12:25:06 -0400 |
commit | 7e18530bef6a18a5479690ae7e8256319ecf1300 (patch) | |
tree | 01b336aed89889bf654327346742956abe0a5d45 /fs/xfs/xfs_mount.c | |
parent | 33c7a2bc48a81fa714572f8ce29f29bc17e6faf0 (diff) |
xfs: rationalise xfs_mount_wq users
Instead of starting and stopping background work on the xfs_mount_wq
all at the same time, separate them to where they really are needed
to start and stop.
The xfs_sync_worker, only needs to be started after all the mount
processing has completed successfully, while it needs to be stopped
before the log is unmounted.
The xfs_reclaim_worker is started on demand, and can be
stopped before the unmount process does it's own inode reclaim pass.
The xfs_flush_inodes work is run on demand, and so we really only
need to ensure that it has stopped running before we start
processing an unmount, freeze or remount,ro.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r-- | fs/xfs/xfs_mount.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index b2bd3a0e6376..d9a31c6a0c53 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -1450,9 +1450,11 @@ xfs_unmountfs( | |||
1450 | 1450 | ||
1451 | /* | 1451 | /* |
1452 | * And reclaim all inodes. At this point there should be no dirty | 1452 | * And reclaim all inodes. At this point there should be no dirty |
1453 | * inode, and none should be pinned or locked, but use synchronous | 1453 | * inodes and none should be pinned or locked, but use synchronous |
1454 | * reclaim just to be sure. | 1454 | * reclaim just to be sure. We can stop background inode reclaim |
1455 | * here as well if it is still running. | ||
1455 | */ | 1456 | */ |
1457 | cancel_delayed_work_sync(&mp->m_reclaim_work); | ||
1456 | xfs_reclaim_inodes(mp, SYNC_WAIT); | 1458 | xfs_reclaim_inodes(mp, SYNC_WAIT); |
1457 | 1459 | ||
1458 | xfs_qm_unmount(mp); | 1460 | xfs_qm_unmount(mp); |