[PATCH v7 06/61] xfs: Rename xa_ elements to ail_
From: Matthew WilcoxThis is a simple rename, except that xa_ail becomes ail_head. Signed-off-by: Matthew Wilcox Reviewed-by: Darrick J. Wong --- fs/xfs/xfs_buf_item.c| 10 ++-- fs/xfs/xfs_dquot.c | 4 +- fs/xfs/xfs_dquot_item.c | 11 ++-- fs/xfs/xfs_inode_item.c | 22 +++ fs/xfs/xfs_log.c | 6 +- fs/xfs/xfs_log_recover.c | 80 - fs/xfs/xfs_trans.c | 18 +++--- fs/xfs/xfs_trans_ail.c | 152 +++ fs/xfs/xfs_trans_buf.c | 4 +- fs/xfs/xfs_trans_priv.h | 42 ++--- 10 files changed, 175 insertions(+), 174 deletions(-) diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index 270ddb4d2313..82ad270e390e 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c @@ -460,7 +460,7 @@ xfs_buf_item_unpin( list_del_init(>b_li_list); bp->b_iodone = NULL; } else { - spin_lock(>xa_lock); + spin_lock(>ail_lock); xfs_trans_ail_delete(ailp, lip, SHUTDOWN_LOG_IO_ERROR); xfs_buf_item_relse(bp); ASSERT(bp->b_log_item == NULL); @@ -1057,12 +1057,12 @@ xfs_buf_do_callbacks_fail( lip = list_first_entry(>b_li_list, struct xfs_log_item, li_bio_list); ailp = lip->li_ailp; - spin_lock(>xa_lock); + spin_lock(>ail_lock); list_for_each_entry(lip, >b_li_list, li_bio_list) { if (lip->li_ops->iop_error) lip->li_ops->iop_error(lip, bp); } - spin_unlock(>xa_lock); + spin_unlock(>ail_lock); } static bool @@ -1226,7 +1226,7 @@ xfs_buf_iodone( * * Either way, AIL is useless if we're forcing a shutdown. */ - spin_lock(>xa_lock); + spin_lock(>ail_lock); xfs_trans_ail_delete(ailp, lip, SHUTDOWN_CORRUPT_INCORE); xfs_buf_item_free(BUF_ITEM(lip)); } @@ -1246,7 +1246,7 @@ xfs_buf_resubmit_failed_buffers( /* * Clear XFS_LI_FAILED flag from all items before resubmit * -* XFS_LI_FAILED set/clear is protected by xa_lock, caller this +* XFS_LI_FAILED set/clear is protected by ail_lock, caller this * function already have it acquired */ list_for_each_entry(lip, >b_li_list, li_bio_list) diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c index 43572f8a1b8e..c4041b676b7b 100644 --- a/fs/xfs/xfs_dquot.c +++ b/fs/xfs/xfs_dquot.c @@ -920,7 +920,7 @@ xfs_qm_dqflush_done( (lip->li_flags & XFS_LI_FAILED))) { /* xfs_trans_ail_delete() drops the AIL lock. */ - spin_lock(>xa_lock); + spin_lock(>ail_lock); if (lip->li_lsn == qip->qli_flush_lsn) { xfs_trans_ail_delete(ailp, lip, SHUTDOWN_CORRUPT_INCORE); } else { @@ -930,7 +930,7 @@ xfs_qm_dqflush_done( */ if (lip->li_flags & XFS_LI_FAILED) xfs_clear_li_failed(lip); - spin_unlock(>xa_lock); + spin_unlock(>ail_lock); } } diff --git a/fs/xfs/xfs_dquot_item.c b/fs/xfs/xfs_dquot_item.c index 96eaa6933709..4b331e354da7 100644 --- a/fs/xfs/xfs_dquot_item.c +++ b/fs/xfs/xfs_dquot_item.c @@ -157,8 +157,9 @@ xfs_dquot_item_error( STATIC uint xfs_qm_dquot_logitem_push( struct xfs_log_item *lip, - struct list_head*buffer_list) __releases(>li_ailp->xa_lock) - __acquires(>li_ailp->xa_lock) + struct list_head*buffer_list) + __releases(>li_ailp->ail_lock) + __acquires(>li_ailp->ail_lock) { struct xfs_dquot*dqp = DQUOT_ITEM(lip)->qli_dquot; struct xfs_buf *bp = lip->li_buf; @@ -205,7 +206,7 @@ xfs_qm_dquot_logitem_push( goto out_unlock; } - spin_unlock(>li_ailp->xa_lock); + spin_unlock(>li_ailp->ail_lock); error = xfs_qm_dqflush(dqp, ); if (error) { @@ -217,7 +218,7 @@ xfs_qm_dquot_logitem_push( xfs_buf_relse(bp); } - spin_lock(>li_ailp->xa_lock); + spin_lock(>li_ailp->ail_lock); out_unlock: xfs_dqunlock(dqp); return rval; @@ -400,7 +401,7 @@ xfs_qm_qoffend_logitem_committed( * Delete the qoff-start logitem from the AIL. * xfs_trans_ail_delete() drops the AIL lock. */ - spin_lock(>xa_lock); + spin_lock(>ail_lock); xfs_trans_ail_delete(ailp, >qql_item, SHUTDOWN_LOG_IO_ERROR); kmem_free(qfs->qql_item.li_lv_shadow); diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c index d5037f060d6f..7666eae8844f 100644 ---
[PATCH v7 06/61] xfs: Rename xa_ elements to ail_
From: Matthew Wilcox This is a simple rename, except that xa_ail becomes ail_head. Signed-off-by: Matthew Wilcox Reviewed-by: Darrick J. Wong --- fs/xfs/xfs_buf_item.c| 10 ++-- fs/xfs/xfs_dquot.c | 4 +- fs/xfs/xfs_dquot_item.c | 11 ++-- fs/xfs/xfs_inode_item.c | 22 +++ fs/xfs/xfs_log.c | 6 +- fs/xfs/xfs_log_recover.c | 80 - fs/xfs/xfs_trans.c | 18 +++--- fs/xfs/xfs_trans_ail.c | 152 +++ fs/xfs/xfs_trans_buf.c | 4 +- fs/xfs/xfs_trans_priv.h | 42 ++--- 10 files changed, 175 insertions(+), 174 deletions(-) diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index 270ddb4d2313..82ad270e390e 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c @@ -460,7 +460,7 @@ xfs_buf_item_unpin( list_del_init(>b_li_list); bp->b_iodone = NULL; } else { - spin_lock(>xa_lock); + spin_lock(>ail_lock); xfs_trans_ail_delete(ailp, lip, SHUTDOWN_LOG_IO_ERROR); xfs_buf_item_relse(bp); ASSERT(bp->b_log_item == NULL); @@ -1057,12 +1057,12 @@ xfs_buf_do_callbacks_fail( lip = list_first_entry(>b_li_list, struct xfs_log_item, li_bio_list); ailp = lip->li_ailp; - spin_lock(>xa_lock); + spin_lock(>ail_lock); list_for_each_entry(lip, >b_li_list, li_bio_list) { if (lip->li_ops->iop_error) lip->li_ops->iop_error(lip, bp); } - spin_unlock(>xa_lock); + spin_unlock(>ail_lock); } static bool @@ -1226,7 +1226,7 @@ xfs_buf_iodone( * * Either way, AIL is useless if we're forcing a shutdown. */ - spin_lock(>xa_lock); + spin_lock(>ail_lock); xfs_trans_ail_delete(ailp, lip, SHUTDOWN_CORRUPT_INCORE); xfs_buf_item_free(BUF_ITEM(lip)); } @@ -1246,7 +1246,7 @@ xfs_buf_resubmit_failed_buffers( /* * Clear XFS_LI_FAILED flag from all items before resubmit * -* XFS_LI_FAILED set/clear is protected by xa_lock, caller this +* XFS_LI_FAILED set/clear is protected by ail_lock, caller this * function already have it acquired */ list_for_each_entry(lip, >b_li_list, li_bio_list) diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c index 43572f8a1b8e..c4041b676b7b 100644 --- a/fs/xfs/xfs_dquot.c +++ b/fs/xfs/xfs_dquot.c @@ -920,7 +920,7 @@ xfs_qm_dqflush_done( (lip->li_flags & XFS_LI_FAILED))) { /* xfs_trans_ail_delete() drops the AIL lock. */ - spin_lock(>xa_lock); + spin_lock(>ail_lock); if (lip->li_lsn == qip->qli_flush_lsn) { xfs_trans_ail_delete(ailp, lip, SHUTDOWN_CORRUPT_INCORE); } else { @@ -930,7 +930,7 @@ xfs_qm_dqflush_done( */ if (lip->li_flags & XFS_LI_FAILED) xfs_clear_li_failed(lip); - spin_unlock(>xa_lock); + spin_unlock(>ail_lock); } } diff --git a/fs/xfs/xfs_dquot_item.c b/fs/xfs/xfs_dquot_item.c index 96eaa6933709..4b331e354da7 100644 --- a/fs/xfs/xfs_dquot_item.c +++ b/fs/xfs/xfs_dquot_item.c @@ -157,8 +157,9 @@ xfs_dquot_item_error( STATIC uint xfs_qm_dquot_logitem_push( struct xfs_log_item *lip, - struct list_head*buffer_list) __releases(>li_ailp->xa_lock) - __acquires(>li_ailp->xa_lock) + struct list_head*buffer_list) + __releases(>li_ailp->ail_lock) + __acquires(>li_ailp->ail_lock) { struct xfs_dquot*dqp = DQUOT_ITEM(lip)->qli_dquot; struct xfs_buf *bp = lip->li_buf; @@ -205,7 +206,7 @@ xfs_qm_dquot_logitem_push( goto out_unlock; } - spin_unlock(>li_ailp->xa_lock); + spin_unlock(>li_ailp->ail_lock); error = xfs_qm_dqflush(dqp, ); if (error) { @@ -217,7 +218,7 @@ xfs_qm_dquot_logitem_push( xfs_buf_relse(bp); } - spin_lock(>li_ailp->xa_lock); + spin_lock(>li_ailp->ail_lock); out_unlock: xfs_dqunlock(dqp); return rval; @@ -400,7 +401,7 @@ xfs_qm_qoffend_logitem_committed( * Delete the qoff-start logitem from the AIL. * xfs_trans_ail_delete() drops the AIL lock. */ - spin_lock(>xa_lock); + spin_lock(>ail_lock); xfs_trans_ail_delete(ailp, >qql_item, SHUTDOWN_LOG_IO_ERROR); kmem_free(qfs->qql_item.li_lv_shadow); diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c index d5037f060d6f..7666eae8844f 100644 --- a/fs/xfs/xfs_inode_item.c +++ b/fs/xfs/xfs_inode_item.c @@ -502,8 +502,8 @@ STATIC