Commit a050acdf authored by Darrick J. Wong's avatar Darrick J. Wong
Browse files

xfs: pass the xfs_defer_pending object to iop_recover



Now that log intent item recovery recreates the xfs_defer_pending state,
we should pass that into the ->iop_recover routines so that the intent
item can finish the recreation work.

Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent 03f7767c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -545,9 +545,10 @@ xfs_attri_validate(
 */
STATIC int
xfs_attri_item_recover(
	struct xfs_log_item		*lip,
	struct xfs_defer_pending	*dfp,
	struct list_head		*capture_list)
{
	struct xfs_log_item		*lip = dfp->dfp_intent;
	struct xfs_attri_log_item	*attrip = ATTRI_ITEM(lip);
	struct xfs_attr_intent		*attr;
	struct xfs_mount		*mp = lip->li_log->l_mp;
+2 −1
Original line number Diff line number Diff line
@@ -486,11 +486,12 @@ xfs_bui_validate(
 */
STATIC int
xfs_bui_item_recover(
	struct xfs_log_item		*lip,
	struct xfs_defer_pending	*dfp,
	struct list_head		*capture_list)
{
	struct xfs_bmap_intent		fake = { };
	struct xfs_trans_res		resv;
	struct xfs_log_item		*lip = dfp->dfp_intent;
	struct xfs_bui_log_item		*buip = BUI_ITEM(lip);
	struct xfs_trans		*tp;
	struct xfs_inode		*ip = NULL;
+2 −1
Original line number Diff line number Diff line
@@ -657,10 +657,11 @@ xfs_efi_validate_ext(
 */
STATIC int
xfs_efi_item_recover(
	struct xfs_log_item		*lip,
	struct xfs_defer_pending	*dfp,
	struct list_head		*capture_list)
{
	struct xfs_trans_res		resv;
	struct xfs_log_item		*lip = dfp->dfp_intent;
	struct xfs_efi_log_item		*efip = EFI_ITEM(lip);
	struct xfs_mount		*mp = lip->li_log->l_mp;
	struct xfs_efd_log_item		*efdp;
+1 −1
Original line number Diff line number Diff line
@@ -2583,7 +2583,7 @@ xlog_recover_process_intents(
		 * The recovery function can free the log item, so we must not
		 * access lip after it returns.
		 */
		error = ops->iop_recover(lip, &capture_list);
		error = ops->iop_recover(dfp, &capture_list);
		if (error) {
			trace_xlog_intent_recovery_failed(log->l_mp, error,
					ops->iop_recover);
+2 −1
Original line number Diff line number Diff line
@@ -474,10 +474,11 @@ xfs_cui_validate_phys(
 */
STATIC int
xfs_cui_item_recover(
	struct xfs_log_item		*lip,
	struct xfs_defer_pending	*dfp,
	struct list_head		*capture_list)
{
	struct xfs_trans_res		resv;
	struct xfs_log_item		*lip = dfp->dfp_intent;
	struct xfs_cui_log_item		*cuip = CUI_ITEM(lip);
	struct xfs_cud_log_item		*cudp;
	struct xfs_trans		*tp;
Loading