]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs: move comment about two 2 keys per pointer in the rmap btree
authorChristoph Hellwig <hch@lst.de>
Mon, 22 Apr 2024 17:01:01 +0000 (10:01 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 3 Jun 2024 18:37:38 +0000 (11:37 -0700)
Source kernel commit: 72c2070f3f52196a2e8b4efced94390b62eb8ac4

Move it to the relevant initialization of the ops structure instead
of a place that has nothing to do with the key size.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
libxfs/xfs_rmap_btree.c

index f87e34a1dee85a2e8b7162d20f7320f0c972279e..311261df38a2267eb69fc34648f507c98e0ca00c 100644 (file)
@@ -475,6 +475,7 @@ const struct xfs_btree_ops xfs_rmapbt_ops = {
        .geom_flags             = XFS_BTGEO_OVERLAPPING,
 
        .rec_len                = sizeof(struct xfs_rmap_rec),
+       /* Overlapping btree; 2 keys per pointer. */
        .key_len                = 2 * sizeof(struct xfs_rmap_key),
        .ptr_len                = XFS_BTREE_SHORT_PTR_LEN,
 
@@ -507,7 +508,6 @@ xfs_rmapbt_init_common(
 {
        struct xfs_btree_cur    *cur;
 
-       /* Overlapping btree; 2 keys per pointer. */
        cur = xfs_btree_alloc_cursor(mp, tp, XFS_BTNUM_RMAP, &xfs_rmapbt_ops,
                        mp->m_rmap_maxlevels, xfs_rmapbt_cur_cache);
        cur->bc_ag.pag = xfs_perag_hold(pag);