summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/newbt.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-07-14 11:05:59 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-11-09 19:07:23 -0800
commite842cba7466b256e9eecab91a0ebd0356af44e70 (patch)
treea908fd834d4786a19084ee478673d78458271e4c /fs/xfs/scrub/newbt.h
parentcd799d70af05a141abf8704434616dda8d4c0a14 (diff)
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 <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/scrub/newbt.h')
-rw-r--r--fs/xfs/scrub/newbt.h4
1 files changed, 4 insertions, 0 deletions
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__ */