]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
xfs: extern some btree ops structures
authorDarrick J. Wong <djwong@kernel.org>
Thu, 22 Feb 2024 20:35:15 +0000 (12:35 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 22 Feb 2024 20:35:15 +0000 (12:35 -0800)
Expose these static btree ops structures so that we can reference them
in the AG initialization code in the next patch.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_alloc_btree.c
fs/xfs/libxfs/xfs_bmap_btree.c
fs/xfs/libxfs/xfs_ialloc_btree.c
fs/xfs/libxfs/xfs_refcount_btree.c
fs/xfs/libxfs/xfs_rmap_btree.c
fs/xfs/libxfs/xfs_shared.h

index 91485b642471d400e8583733e07ebe3192311f72..a983c4fe83902ec3655083725dc399a90556b60a 100644 (file)
@@ -454,7 +454,7 @@ xfs_allocbt_keys_contiguous(
                                 be32_to_cpu(key2->alloc.ar_startblock));
 }
 
-static const struct xfs_btree_ops xfs_bnobt_ops = {
+const struct xfs_btree_ops xfs_bnobt_ops = {
        .rec_len                = sizeof(xfs_alloc_rec_t),
        .key_len                = sizeof(xfs_alloc_key_t),
 
@@ -477,7 +477,7 @@ static const struct xfs_btree_ops xfs_bnobt_ops = {
        .keys_contiguous        = xfs_allocbt_keys_contiguous,
 };
 
-static const struct xfs_btree_ops xfs_cntbt_ops = {
+const struct xfs_btree_ops xfs_cntbt_ops = {
        .geom_flags             = XFS_BTGEO_LASTREC_UPDATE,
 
        .rec_len                = sizeof(xfs_alloc_rec_t),
index 48617627bc83f1ad23626a4b5254283003c01f8e..1f229e59ec25ebaa7426da7b34fae38f1482ba20 100644 (file)
@@ -510,7 +510,7 @@ xfs_bmbt_keys_contiguous(
                                 be64_to_cpu(key2->bmbt.br_startoff));
 }
 
-static const struct xfs_btree_ops xfs_bmbt_ops = {
+const struct xfs_btree_ops xfs_bmbt_ops = {
        .geom_flags             = XFS_BTGEO_LONG_PTRS | XFS_BTGEO_ROOT_IN_INODE,
 
        .rec_len                = sizeof(xfs_bmbt_rec_t),
index 3e65f028f3eeaad3cc2dff50e47b534050f5fc29..69086fdc3be6ff200ce467fd32e7fadc10acfba2 100644 (file)
@@ -398,7 +398,7 @@ xfs_inobt_keys_contiguous(
                                 be32_to_cpu(key2->inobt.ir_startino));
 }
 
-static const struct xfs_btree_ops xfs_inobt_ops = {
+const struct xfs_btree_ops xfs_inobt_ops = {
        .rec_len                = sizeof(xfs_inobt_rec_t),
        .key_len                = sizeof(xfs_inobt_key_t),
 
@@ -420,7 +420,7 @@ static const struct xfs_btree_ops xfs_inobt_ops = {
        .keys_contiguous        = xfs_inobt_keys_contiguous,
 };
 
-static const struct xfs_btree_ops xfs_finobt_ops = {
+const struct xfs_btree_ops xfs_finobt_ops = {
        .rec_len                = sizeof(xfs_inobt_rec_t),
        .key_len                = sizeof(xfs_inobt_key_t),
 
index 6a3a827dd366300928859f0461502e034b44b662..36e7b26d5e3b21d3b7771cfd5fbe085e7a5cc564 100644 (file)
@@ -317,7 +317,7 @@ xfs_refcountbt_keys_contiguous(
                                 be32_to_cpu(key2->refc.rc_startblock));
 }
 
-static const struct xfs_btree_ops xfs_refcountbt_ops = {
+const struct xfs_btree_ops xfs_refcountbt_ops = {
        .rec_len                = sizeof(struct xfs_refcount_rec),
        .key_len                = sizeof(struct xfs_refcount_key),
 
index 776ab6b2be3130ed209d598b79bba71ce8308c32..086576626f5b994a4a4ac60ba4c62141b5760855 100644 (file)
@@ -472,7 +472,7 @@ xfs_rmapbt_keys_contiguous(
                                 be32_to_cpu(key2->rmap.rm_startblock));
 }
 
-static const struct xfs_btree_ops xfs_rmapbt_ops = {
+const struct xfs_btree_ops xfs_rmapbt_ops = {
        .geom_flags             = XFS_BTGEO_OVERLAPPING,
 
        .rec_len                = sizeof(struct xfs_rmap_rec),
index 4220d3584c1b0b03b0fb6138ad86b2c9a440de4c..518ea9456ebae6160df5e97288239f9b42e18998 100644 (file)
@@ -43,6 +43,15 @@ extern const struct xfs_buf_ops xfs_sb_buf_ops;
 extern const struct xfs_buf_ops xfs_sb_quiet_buf_ops;
 extern const struct xfs_buf_ops xfs_symlink_buf_ops;
 
+/* btree ops */
+extern const struct xfs_btree_ops xfs_bnobt_ops;
+extern const struct xfs_btree_ops xfs_cntbt_ops;
+extern const struct xfs_btree_ops xfs_inobt_ops;
+extern const struct xfs_btree_ops xfs_finobt_ops;
+extern const struct xfs_btree_ops xfs_bmbt_ops;
+extern const struct xfs_btree_ops xfs_refcountbt_ops;
+extern const struct xfs_btree_ops xfs_rmapbt_ops;
+
 /* log size calculation functions */
 int    xfs_log_calc_unit_res(struct xfs_mount *mp, int unit_bytes);
 int    xfs_log_calc_minimum_size(struct xfs_mount *);