aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log.c
diff options
context:
space:
mode:
authorDavid Chinner <david@fromorbit.com>2008-10-30 02:39:00 -0400
committerLachlan McIlroy <lachlan@sgi.com>2008-10-30 02:39:00 -0400
commit5b00f14fbd60d42441f78c0e414a539cbfba5cb9 (patch)
tree6ecce1247c704666e2835883de73cb300c1b0693 /fs/xfs/xfs_log.c
parent27d8d5fe0ef9daeaafbdd32b14b32a2211930062 (diff)
[XFS] move the AIl traversal over to a consistent interface
With the new cursor interface, it makes sense to make all the traversing code use the cursor interface and make the old one go away. This means more of the AIL interfacing is done by passing struct xfs_ail pointers around the place instead of struct xfs_mount pointers. We can replace the use of xfs_trans_first_ail() in xfs_log_need_covered() as it is only checking if the AIL is empty. We can do that with a call to xfs_trans_ail_tail() instead, where a zero LSN returned indicates and empty AIL... SGI-PV: 988143 SGI-Modid: xfs-linux-melb:xfs-kern:32348a Signed-off-by: David Chinner <david@fromorbit.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org>
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r--fs/xfs/xfs_log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 4184085d44af..31fbb2eea092 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -909,7 +909,7 @@ xfs_log_need_covered(xfs_mount_t *mp)
909 spin_lock(&log->l_icloglock); 909 spin_lock(&log->l_icloglock);
910 if (((log->l_covered_state == XLOG_STATE_COVER_NEED) || 910 if (((log->l_covered_state == XLOG_STATE_COVER_NEED) ||
911 (log->l_covered_state == XLOG_STATE_COVER_NEED2)) 911 (log->l_covered_state == XLOG_STATE_COVER_NEED2))
912 && !xfs_trans_first_ail(mp, NULL) 912 && !xfs_trans_ail_tail(mp->m_ail)
913 && xlog_iclogs_empty(log)) { 913 && xlog_iclogs_empty(log)) {
914 if (log->l_covered_state == XLOG_STATE_COVER_NEED) 914 if (log->l_covered_state == XLOG_STATE_COVER_NEED)
915 log->l_covered_state = XLOG_STATE_COVER_DONE; 915 log->l_covered_state = XLOG_STATE_COVER_DONE;
@@ -946,7 +946,7 @@ xlog_assign_tail_lsn(xfs_mount_t *mp)
946 xfs_lsn_t tail_lsn; 946 xfs_lsn_t tail_lsn;
947 xlog_t *log = mp->m_log; 947 xlog_t *log = mp->m_log;
948 948
949 tail_lsn = xfs_trans_tail_ail(mp); 949 tail_lsn = xfs_trans_ail_tail(mp->m_ail);
950 spin_lock(&log->l_grant_lock); 950 spin_lock(&log->l_grant_lock);
951 if (tail_lsn != 0) { 951 if (tail_lsn != 0) {
952 log->l_tail_lsn = tail_lsn; 952 log->l_tail_lsn = tail_lsn;