Hi all, This patchset prepares the generic btree code to allow for the creation of new btree types outside of libxfs. The end goal here is for online fsck to be able to create its own in-memory btrees that will be used to improve the performance (and reduce the memory requirements of) the refcount btree. To enable this, I decided that the btree ops structure is the ideal place to encode all of the geometry information about a btree. The btree ops struture already contains the buffer ops (and hence the btree block magic numbers) as well as the key and record sizes, so it doesn't seem all that farfetched to encode the XFS_BTREE_ flags that determine the geometry (ROOT_IN_INODE, LONG_PTRS, etc). The rest of the patchset cleans up the btree functions that initialize btree blocks and btree buffers. The bulk of this work is to replace btree geometry related function call arguments with a single pointer to the ops structure, and then clean up everything else around that. As a side effect, we rename the functions. If you're going to start using this code, I strongly recommend pulling from my git trees, which are linked below. This has been running on the djcloud for months with no problems. Enjoy! Comments and questions are, as always, welcome. --D kernel git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=btree-geometry-in-ops xfsprogs git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=btree-geometry-in-ops --- libxfs/xfbtree.c | 15 ++------- libxfs/xfs_ag.c | 33 ++++++++------------ libxfs/xfs_ag.h | 2 + libxfs/xfs_alloc_btree.c | 21 +++++-------- libxfs/xfs_bmap.c | 9 +----- libxfs/xfs_bmap_btree.c | 14 ++------- libxfs/xfs_btree.c | 70 ++++++++++++++++++++++--------------------- libxfs/xfs_btree.h | 36 ++++++++++------------ libxfs/xfs_btree_mem.h | 9 ------ libxfs/xfs_btree_staging.c | 6 +--- libxfs/xfs_ialloc_btree.c | 17 +++++----- libxfs/xfs_refcount_btree.c | 8 ++--- libxfs/xfs_rmap_btree.c | 16 ++++------ libxfs/xfs_shared.h | 9 ++++++ 14 files changed, 113 insertions(+), 152 deletions(-)