From: Darrick J. Wong <djwong@xxxxxxxxxx> Remove these fields now that we get all the info we need from the btree ops. Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- fs/xfs/libxfs/xfs_btree_mem.h | 9 --------- fs/xfs/libxfs/xfs_rmap_btree.c | 1 - fs/xfs/scrub/trace.h | 10 ++++------ fs/xfs/scrub/xfbtree.c | 4 ++-- 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/fs/xfs/libxfs/xfs_btree_mem.h b/fs/xfs/libxfs/xfs_btree_mem.h index 5e7b1f20fb5b..ee142b972839 100644 --- a/fs/xfs/libxfs/xfs_btree_mem.h +++ b/fs/xfs/libxfs/xfs_btree_mem.h @@ -17,17 +17,8 @@ struct xfbtree_config { /* Owner of this btree. */ unsigned long long owner; - - /* Btree type number */ - xfs_btnum_t btnum; - - /* XFBTREE_CREATE_* flags */ - unsigned int flags; }; -/* btree has long pointers */ -#define XFBTREE_CREATE_LONG_PTRS (1U << 0) - #ifdef CONFIG_XFS_IN_MEMORY_BTREE unsigned int xfs_btree_mem_head_nlevels(struct xfs_buf *head_bp); diff --git a/fs/xfs/libxfs/xfs_rmap_btree.c b/fs/xfs/libxfs/xfs_rmap_btree.c index 31dc40358bf9..ebd86c559837 100644 --- a/fs/xfs/libxfs/xfs_rmap_btree.c +++ b/fs/xfs/libxfs/xfs_rmap_btree.c @@ -669,7 +669,6 @@ xfs_rmapbt_mem_create( struct xfbtree_config cfg = { .btree_ops = &xfs_rmapbt_mem_ops, .target = target, - .btnum = XFS_BTNUM_RMAP, .owner = agno, }; diff --git a/fs/xfs/scrub/trace.h b/fs/xfs/scrub/trace.h index dc0547691fe4..213134d812e8 100644 --- a/fs/xfs/scrub/trace.h +++ b/fs/xfs/scrub/trace.h @@ -2013,8 +2013,7 @@ TRACE_EVENT(xfbtree_create, struct xfbtree *xfbt), TP_ARGS(mp, cfg, xfbt), TP_STRUCT__entry( - __field(xfs_btnum_t, btnum) - __field(unsigned int, xfbtree_flags) + __field(const void *, btree_ops) __field(unsigned long, xfino) __field(unsigned int, leaf_mxr) __field(unsigned int, leaf_mnr) @@ -2023,8 +2022,7 @@ TRACE_EVENT(xfbtree_create, __field(unsigned long long, owner) ), TP_fast_assign( - __entry->btnum = cfg->btnum; - __entry->xfbtree_flags = cfg->flags; + __entry->btree_ops = cfg->btree_ops; __entry->xfino = xfbtree_ino(xfbt); __entry->leaf_mxr = xfbt->maxrecs[0]; __entry->node_mxr = xfbt->maxrecs[1]; @@ -2032,9 +2030,9 @@ TRACE_EVENT(xfbtree_create, __entry->node_mnr = xfbt->minrecs[1]; __entry->owner = cfg->owner; ), - TP_printk("xfino 0x%lx btnum %s owner 0x%llx leaf_mxr %u leaf_mnr %u node_mxr %u node_mnr %u", + TP_printk("xfino 0x%lx btree_ops %pS owner 0x%llx leaf_mxr %u leaf_mnr %u node_mxr %u node_mnr %u", __entry->xfino, - __print_symbolic(__entry->btnum, XFS_BTNUM_STRINGS), + __entry->btree_ops, __entry->owner, __entry->leaf_mxr, __entry->leaf_mnr, diff --git a/fs/xfs/scrub/xfbtree.c b/fs/xfs/scrub/xfbtree.c index ac7b9f679b56..072e1d8b813e 100644 --- a/fs/xfs/scrub/xfbtree.c +++ b/fs/xfs/scrub/xfbtree.c @@ -384,7 +384,7 @@ xfbtree_rec_bytes( { unsigned int blocklen = xfo_to_b(1); - if (cfg->flags & XFBTREE_CREATE_LONG_PTRS) { + if (cfg->btree_ops->geom_flags & XFS_BTREE_LONG_PTRS) { if (xfs_has_crc(mp)) return blocklen - XFS_BTREE_LBLOCK_CRC_LEN; @@ -481,7 +481,7 @@ xfbtree_create( xbitmap_init(xfbt->freespace); /* Set up min/maxrecs for this btree. */ - if (cfg->flags & XFBTREE_CREATE_LONG_PTRS) + if (cfg->btree_ops->geom_flags & XFS_BTREE_LONG_PTRS) keyptr_len += sizeof(__be64); else keyptr_len += sizeof(__be32);