diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-02-22 21:43:42 +0100 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-02-22 21:43:42 +0100 |
commit | 7fbaab57a80f1639add1c7d02adeb9d17bd50206 (patch) | |
tree | 4e49ba33705fcb79955cfb9fa7906d8eed771ab2 /fs/xfs/xfs_super.c | |
parent | xfs: create refcount bag structure for btree repairs (diff) | |
download | linux-7fbaab57a80f1639add1c7d02adeb9d17bd50206.tar.xz linux-7fbaab57a80f1639add1c7d02adeb9d17bd50206.zip |
xfs: port refcount repair to the new refcount bag structure
Port the refcount record generating code to use the new refcount bag
data structure.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r-- | fs/xfs/xfs_super.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 74e87ed5eee1..6828c48b15e9 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -44,6 +44,7 @@ #include "xfs_dahash_test.h" #include "xfs_rtbitmap.h" #include "scrub/stats.h" +#include "scrub/rcbag_btree.h" #include <linux/magic.h> #include <linux/fs_context.h> @@ -2060,10 +2061,14 @@ xfs_init_caches(void) if (error) goto out_destroy_log_ticket_cache; - error = xfs_defer_init_item_caches(); + error = rcbagbt_init_cur_cache(); if (error) goto out_destroy_btree_cur_cache; + error = xfs_defer_init_item_caches(); + if (error) + goto out_destroy_rcbagbt_cur_cache; + xfs_da_state_cache = kmem_cache_create("xfs_da_state", sizeof(struct xfs_da_state), 0, 0, NULL); @@ -2220,6 +2225,8 @@ xfs_init_caches(void) kmem_cache_destroy(xfs_da_state_cache); out_destroy_defer_item_cache: xfs_defer_destroy_item_caches(); + out_destroy_rcbagbt_cur_cache: + rcbagbt_destroy_cur_cache(); out_destroy_btree_cur_cache: xfs_btree_destroy_cur_caches(); out_destroy_log_ticket_cache: @@ -2257,6 +2264,7 @@ xfs_destroy_caches(void) kmem_cache_destroy(xfs_ifork_cache); kmem_cache_destroy(xfs_da_state_cache); xfs_defer_destroy_item_caches(); + rcbagbt_destroy_cur_cache(); xfs_btree_destroy_cur_caches(); kmem_cache_destroy(xfs_log_ticket_cache); kmem_cache_destroy(xfs_buf_cache); |