summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_refcount_btree.h
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2020-03-11 19:09:06 +0100
committerDarrick J. Wong <darrick.wong@oracle.com>2020-03-18 16:12:23 +0100
commit56e98164ffea2a9ee577e5e4f368c6d5182ed8eb (patch)
tree0823faf588c6786ccb5fee9995c3da8976f2bc83 /fs/xfs/libxfs/xfs_refcount_btree.h
parentxfs: add support for inode btree staging cursors (diff)
downloadlinux-56e98164ffea2a9ee577e5e4f368c6d5182ed8eb.tar.xz
linux-56e98164ffea2a9ee577e5e4f368c6d5182ed8eb.zip
xfs: add support for refcount btree staging cursors
Add support for btree staging cursors for the refcount btrees. This is needed both for online repair and also to convert xfs_repair to use btree bulk loading. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to '')
-rw-r--r--fs/xfs/libxfs/xfs_refcount_btree.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_refcount_btree.h b/fs/xfs/libxfs/xfs_refcount_btree.h
index ba416f71c824..69dc515db671 100644
--- a/fs/xfs/libxfs/xfs_refcount_btree.h
+++ b/fs/xfs/libxfs/xfs_refcount_btree.h
@@ -13,6 +13,7 @@
struct xfs_buf;
struct xfs_btree_cur;
struct xfs_mount;
+struct xbtree_afakeroot;
/*
* Btree block header size
@@ -46,6 +47,8 @@ struct xfs_mount;
extern struct xfs_btree_cur *xfs_refcountbt_init_cursor(struct xfs_mount *mp,
struct xfs_trans *tp, struct xfs_buf *agbp,
xfs_agnumber_t agno);
+struct xfs_btree_cur *xfs_refcountbt_stage_cursor(struct xfs_mount *mp,
+ struct xbtree_afakeroot *afake, xfs_agnumber_t agno);
extern int xfs_refcountbt_maxrecs(int blocklen, bool leaf);
extern void xfs_refcountbt_compute_maxlevels(struct xfs_mount *mp);
@@ -58,4 +61,7 @@ extern int xfs_refcountbt_calc_reserves(struct xfs_mount *mp,
struct xfs_trans *tp, xfs_agnumber_t agno, xfs_extlen_t *ask,
xfs_extlen_t *used);
+void xfs_refcountbt_commit_staged_btree(struct xfs_btree_cur *cur,
+ struct xfs_trans *tp, struct xfs_buf *agbp);
+
#endif /* __XFS_REFCOUNT_BTREE_H__ */