From: Darrick J. Wong Date: Mon, 15 Apr 2024 23:07:31 +0000 (-0700) Subject: xfs: recreate work items when recovering intent items X-Git-Tag: v6.8.0~103 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d56bb0de167b70f1099c30b0a1c2840e979d826d;p=thirdparty%2Fxfsprogs-dev.git xfs: recreate work items when recovering intent items Source kernel commit: e70fb328d5277297ea2d9169a3a046de6412d777 Recreate work items for each xfs_defer_pending object when we are recovering intent items. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Bill O'Donnell --- diff --git a/libxfs/xfs_defer.c b/libxfs/xfs_defer.c index bd6f14a2..4900a7d6 100644 --- a/libxfs/xfs_defer.c +++ b/libxfs/xfs_defer.c @@ -671,9 +671,8 @@ xfs_defer_add( list_add_tail(&dfp->dfp_list, &tp->t_dfops); } - list_add_tail(li, &dfp->dfp_work); + xfs_defer_add_item(dfp, li); trace_xfs_defer_add_item(tp->t_mountp, dfp, li); - dfp->dfp_count++; } /* diff --git a/libxfs/xfs_defer.h b/libxfs/xfs_defer.h index 5dce938b..bef5823f 100644 --- a/libxfs/xfs_defer.h +++ b/libxfs/xfs_defer.h @@ -130,6 +130,15 @@ void xfs_defer_start_recovery(struct xfs_log_item *lip, void xfs_defer_cancel_recovery(struct xfs_mount *mp, struct xfs_defer_pending *dfp); +static inline void +xfs_defer_add_item( + struct xfs_defer_pending *dfp, + struct list_head *work) +{ + list_add_tail(work, &dfp->dfp_work); + dfp->dfp_count++; +} + int __init xfs_defer_init_item_caches(void); void xfs_defer_destroy_item_caches(void);