]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: extern some btree ops structures
authorDarrick J. Wong <djwong@kernel.org>
Mon, 22 Apr 2024 17:00:58 +0000 (10:00 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 3 Jun 2024 18:37:37 +0000 (11:37 -0700)
Source kernel commit: d8d6df4253adcdb5862a9410d962e9168b973c88

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>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
libxfs/xfs_alloc_btree.c
libxfs/xfs_bmap_btree.c
libxfs/xfs_ialloc_btree.c
libxfs/xfs_refcount_btree.c
libxfs/xfs_rmap_btree.c
libxfs/xfs_shared.h

index e3c2f90eb57a34b920c4fc4893ab919f4ec15a19..6c9781fcf0d20f84fbc325bf1bd3220eae7b4f95 100644 (file)
@@ -452,7 +452,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),
 
@@ -475,7 +475,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 52a1ce460a1bdd596ac512e0646d25295ef7123c..41b4419b5e70b22186ff07fd3881a28bc49ed6d4 100644 (file)
@@ -509,7 +509,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 dea661afc4df20a9836079ee8de27d79a1986ae6..52cc00e4ff1cee0713da94fe2a0085b636e1b2d6 100644 (file)
@@ -397,7 +397,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),
 
@@ -419,7 +419,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 1ecd670a9eba8c44d7045e654be46d6354009005..2f91c7b62ef1a05bc429b634178176882ff160d4 100644 (file)
@@ -316,7 +316,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 7f815522c82065f0a63dbac158fa9ee133b9f860..c3a113c881d81e9caa4e7be8a32c780b1a1bf572 100644 (file)
@@ -470,7 +470,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 *);