mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
[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>
This commit is contained in:
parent
27d8d5fe0e
commit
5b00f14fbd
5 changed files with 58 additions and 92 deletions
|
@ -909,7 +909,7 @@ xfs_log_need_covered(xfs_mount_t *mp)
|
|||
spin_lock(&log->l_icloglock);
|
||||
if (((log->l_covered_state == XLOG_STATE_COVER_NEED) ||
|
||||
(log->l_covered_state == XLOG_STATE_COVER_NEED2))
|
||||
&& !xfs_trans_first_ail(mp, NULL)
|
||||
&& !xfs_trans_ail_tail(mp->m_ail)
|
||||
&& xlog_iclogs_empty(log)) {
|
||||
if (log->l_covered_state == XLOG_STATE_COVER_NEED)
|
||||
log->l_covered_state = XLOG_STATE_COVER_DONE;
|
||||
|
@ -946,7 +946,7 @@ xlog_assign_tail_lsn(xfs_mount_t *mp)
|
|||
xfs_lsn_t tail_lsn;
|
||||
xlog_t *log = mp->m_log;
|
||||
|
||||
tail_lsn = xfs_trans_tail_ail(mp);
|
||||
tail_lsn = xfs_trans_ail_tail(mp->m_ail);
|
||||
spin_lock(&log->l_grant_lock);
|
||||
if (tail_lsn != 0) {
|
||||
log->l_tail_lsn = tail_lsn;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue