diff options
author | Christoph Hellwig <hch@infradead.org> | 2012-04-23 01:58:34 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-05-14 17:20:27 -0400 |
commit | 211e4d434bd737be38aabad0247ce3da9964370e (patch) | |
tree | 6fb654a566507d302ff5672c2e66fb775ca3c6cd /fs/xfs/xfs_trans_priv.h | |
parent | 1c30462542bac8abffb4823638b6b1659c1cfcf5 (diff) |
xfs: implement freezing by emptying the AIL
Now that we write back all metadata either synchronously or through
the AIL we can simply implement metadata freezing in terms of
emptying the AIL.
The implementation for this is fairly simply and straight-forward:
A new routine is added that asks the xfsaild to push the AIL to the
end and waits for it to complete and send a wakeup. The routine will
then loop if the AIL is not actually empty, and continue to do so
until the AIL is compeltely empty.
We keep an inode reclaim pass in the freeze process to avoid having
memory pressure have to reclaim inodes that require dirtying the
filesystem to be reclaimed after the freeze has completed. This
means we can also treat unmount in the exact same way as freeze.
As an upside we can now remove the radix tree based inode writeback
and xfs_unmountfs_writesb.
[ Dave Chinner:
- Cleaned up commit message.
- Added inode reclaim passes back into freeze.
- Cleaned up wakeup mechanism to avoid the use of a new
sleep counter variable. ]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_trans_priv.h')
-rw-r--r-- | fs/xfs/xfs_trans_priv.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_trans_priv.h b/fs/xfs/xfs_trans_priv.h index 46a1ebd4a7a2..218304a8cdc7 100644 --- a/fs/xfs/xfs_trans_priv.h +++ b/fs/xfs/xfs_trans_priv.h | |||
@@ -71,6 +71,7 @@ struct xfs_ail { | |||
71 | spinlock_t xa_lock; | 71 | spinlock_t xa_lock; |
72 | xfs_lsn_t xa_last_pushed_lsn; | 72 | xfs_lsn_t xa_last_pushed_lsn; |
73 | int xa_log_flush; | 73 | int xa_log_flush; |
74 | wait_queue_head_t xa_empty; | ||
74 | }; | 75 | }; |
75 | 76 | ||
76 | /* | 77 | /* |
@@ -102,6 +103,7 @@ xfs_trans_ail_delete( | |||
102 | 103 | ||
103 | void xfs_ail_push(struct xfs_ail *, xfs_lsn_t); | 104 | void xfs_ail_push(struct xfs_ail *, xfs_lsn_t); |
104 | void xfs_ail_push_all(struct xfs_ail *); | 105 | void xfs_ail_push_all(struct xfs_ail *); |
106 | void xfs_ail_push_all_sync(struct xfs_ail *); | ||
105 | struct xfs_log_item *xfs_ail_min(struct xfs_ail *ailp); | 107 | struct xfs_log_item *xfs_ail_min(struct xfs_ail *ailp); |
106 | xfs_lsn_t xfs_ail_min_lsn(struct xfs_ail *ailp); | 108 | xfs_lsn_t xfs_ail_min_lsn(struct xfs_ail *ailp); |
107 | 109 | ||