aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_recover.c
diff options
context:
space:
mode:
authorDavid Chinner <david@fromorbit.com>2008-10-30 02:39:58 -0400
committerLachlan McIlroy <lachlan@sgi.com>2008-10-30 02:39:58 -0400
commit783a2f656f9674c31d4019708a94af93fa1d1c22 (patch)
tree7ac2123b187c0522dbd8a0d94de3856b33147c46 /fs/xfs/xfs_log_recover.c
parentfc1829f34d30899701dfd5890030d39e13e1f47d (diff)
[XFS] Finish removing the mount pointer from the AIL API
Change all the remaining AIL API functions that are passed struct xfs_mount pointers to pass pointers directly to the struct xfs_ail being used. With this conversion, all external access to the AIL is via the struct xfs_ail. Hence the operation and referencing of the AIL is almost entirely independent of the xfs_mount that is using it - it is now much more tightly tied to the log and the items it is tracking in the log than it is tied to the xfs_mount. SGI-PV: 988143 SGI-Modid: xfs-linux-melb:xfs-kern:32353a 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_recover.c')
-rw-r--r--fs/xfs/xfs_log_recover.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 0bbde7b84fc9..cff901efc24b 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -2683,9 +2683,9 @@ xlog_recover_do_efi_trans(
2683 2683
2684 spin_lock(&log->l_ailp->xa_lock); 2684 spin_lock(&log->l_ailp->xa_lock);
2685 /* 2685 /*
2686 * xfs_trans_update_ail() drops the AIL lock. 2686 * xfs_trans_ail_update() drops the AIL lock.
2687 */ 2687 */
2688 xfs_trans_update_ail(mp, (xfs_log_item_t *)efip, lsn); 2688 xfs_trans_ail_update(log->l_ailp, (xfs_log_item_t *)efip, lsn);
2689 return 0; 2689 return 0;
2690} 2690}
2691 2691
@@ -2704,13 +2704,12 @@ xlog_recover_do_efd_trans(
2704 xlog_recover_item_t *item, 2704 xlog_recover_item_t *item,
2705 int pass) 2705 int pass)
2706{ 2706{
2707 xfs_mount_t *mp;
2708 xfs_efd_log_format_t *efd_formatp; 2707 xfs_efd_log_format_t *efd_formatp;
2709 xfs_efi_log_item_t *efip = NULL; 2708 xfs_efi_log_item_t *efip = NULL;
2710 xfs_log_item_t *lip; 2709 xfs_log_item_t *lip;
2711 __uint64_t efi_id; 2710 __uint64_t efi_id;
2712 struct xfs_ail_cursor cur; 2711 struct xfs_ail_cursor cur;
2713 struct xfs_ail *ailp; 2712 struct xfs_ail *ailp = log->l_ailp;
2714 2713
2715 if (pass == XLOG_RECOVER_PASS1) { 2714 if (pass == XLOG_RECOVER_PASS1) {
2716 return; 2715 return;
@@ -2727,8 +2726,6 @@ xlog_recover_do_efd_trans(
2727 * Search for the efi with the id in the efd format structure 2726 * Search for the efi with the id in the efd format structure
2728 * in the AIL. 2727 * in the AIL.
2729 */ 2728 */
2730 mp = log->l_mp;
2731 ailp = log->l_ailp;
2732 spin_lock(&ailp->xa_lock); 2729 spin_lock(&ailp->xa_lock);
2733 lip = xfs_trans_ail_cursor_first(ailp, &cur, 0); 2730 lip = xfs_trans_ail_cursor_first(ailp, &cur, 0);
2734 while (lip != NULL) { 2731 while (lip != NULL) {
@@ -2736,10 +2733,10 @@ xlog_recover_do_efd_trans(
2736 efip = (xfs_efi_log_item_t *)lip; 2733 efip = (xfs_efi_log_item_t *)lip;
2737 if (efip->efi_format.efi_id == efi_id) { 2734 if (efip->efi_format.efi_id == efi_id) {
2738 /* 2735 /*
2739 * xfs_trans_delete_ail() drops the 2736 * xfs_trans_ail_delete() drops the
2740 * AIL lock. 2737 * AIL lock.
2741 */ 2738 */
2742 xfs_trans_delete_ail(mp, lip); 2739 xfs_trans_ail_delete(ailp, lip);
2743 xfs_efi_item_free(efip); 2740 xfs_efi_item_free(efip);
2744 spin_lock(&ailp->xa_lock); 2741 spin_lock(&ailp->xa_lock);
2745 break; 2742 break;