diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2020-05-01 16:00:51 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-05-08 08:50:00 -0700 |
commit | c57ed2f5a2ffa2e2009ffa638efd06c6e86e7ebd (patch) | |
tree | fc651e2a02b4c78ecc6c9ed406e6fe67955c88a6 /fs/xfs/xfs_log_recover.c | |
parent | cba0ccac28a766968243cda597566983843f5be2 (diff) | |
download | linux-c57ed2f5a2ffa2e2009ffa638efd06c6e86e7ebd.tar.bz2 |
xfs: refactor recovered CUI log item playback
Move the code that processes the log items created from the recovered
log items into the per-item source code files and use dispatch functions
to call them. No functional changes.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 4eb837476e44..7d3f7be05395 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -2546,46 +2546,6 @@ xlog_recover_process_data( return 0; } -/* Recover the CUI if necessary. */ -STATIC int -xlog_recover_process_cui( - struct xfs_trans *parent_tp, - struct xfs_ail *ailp, - struct xfs_log_item *lip) -{ - struct xfs_cui_log_item *cuip; - int error; - - /* - * Skip CUIs that we've already processed. - */ - cuip = container_of(lip, struct xfs_cui_log_item, cui_item); - if (test_bit(XFS_CUI_RECOVERED, &cuip->cui_flags)) - return 0; - - spin_unlock(&ailp->ail_lock); - error = xfs_cui_recover(parent_tp, cuip); - spin_lock(&ailp->ail_lock); - - return error; -} - -/* Release the CUI since we're cancelling everything. */ -STATIC void -xlog_recover_cancel_cui( - struct xfs_mount *mp, - struct xfs_ail *ailp, - struct xfs_log_item *lip) -{ - struct xfs_cui_log_item *cuip; - - cuip = container_of(lip, struct xfs_cui_log_item, cui_item); - - spin_unlock(&ailp->ail_lock); - xfs_cui_release(cuip); - spin_lock(&ailp->ail_lock); -} - /* Recover the BUI if necessary. */ STATIC int xlog_recover_process_bui( @@ -2749,9 +2709,6 @@ xlog_recover_process_intents( * replayed in the wrong order! */ switch (lip->li_type) { - case XFS_LI_CUI: - error = xlog_recover_process_cui(parent_tp, ailp, lip); - break; case XFS_LI_BUI: error = xlog_recover_process_bui(parent_tp, ailp, lip); break; @@ -2802,9 +2759,6 @@ xlog_recover_cancel_intents( } switch (lip->li_type) { - case XFS_LI_CUI: - xlog_recover_cancel_cui(log->l_mp, ailp, lip); - break; case XFS_LI_BUI: xlog_recover_cancel_bui(log->l_mp, ailp, lip); break; |