From e842cba7466b256e9eecab91a0ebd0356af44e70 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 14 Jul 2022 11:05:59 -0700 Subject: xfs: log EFIs for all btree blocks being used to stage a btree We need to log EFIs for every extent that we allocate for the purpose of staging a new btree so that if we fail then the blocks will be freed during log recovery. Add a function to relog the EFIs, so that repair can relog them all every time it creates a new btree block, which will help us to avoid pinning the log tail. Signed-off-by: Darrick J. Wong --- fs/xfs/scrub/newbt.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fs/xfs/scrub/newbt.h') diff --git a/fs/xfs/scrub/newbt.h b/fs/xfs/scrub/newbt.h index ac623e4a20ea..6516c7099f51 100644 --- a/fs/xfs/scrub/newbt.h +++ b/fs/xfs/scrub/newbt.h @@ -12,6 +12,9 @@ struct xrep_newbt_resv { struct xfs_perag *pag; + /* EFI tracking this space reservation */ + struct xfs_log_item *efi; + /* AG block of the extent we reserved. */ xfs_agblock_t agbno; @@ -60,5 +63,6 @@ void xrep_newbt_cancel(struct xrep_newbt *xnr); int xrep_newbt_destroy(struct xrep_newbt *xnr); int xrep_newbt_claim_block(struct xfs_btree_cur *cur, struct xrep_newbt *xnr, union xfs_btree_ptr *ptr); +int xrep_newbt_relog_autoreap(struct xrep_newbt *xnr); #endif /* __XFS_SCRUB_NEWBT_H__ */ -- cgit v1.2.3