[PATCHSET v6.0 1/5] xfs: refactor btrees to support records in inode root

Darrick J. Wong
2024-12-13T00:56:56Z

Hi all,

Amend the btree code to support storing btree rcords in the inode root,
because the current bmbt code does not support this.

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-ifork-records

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=btree-ifork-records
---
Commits in this patchset:
* xfs: tidy up xfs_iroot_realloc
* xfs: refactor the inode fork memory allocation functions
* xfs: make xfs_iroot_realloc take the new numrecs instead of deltas
* xfs: make xfs_iroot_realloc a bmap btree function
* xfs: tidy up xfs_bmap_broot_realloc a bit
* xfs: hoist the node iroot update code out of xfs_btree_new_iroot
* xfs: hoist the node iroot update code out of xfs_btree_kill_iroot
* xfs: support storing records in the inode core root
---
fs/xfs/libxfs/xfs_bmap.c | 7 -
fs/xfs/libxfs/xfs_bmap_btree.c | 111 ++++++++++++
fs/xfs/libxfs/xfs_bmap_btree.h | 3
fs/xfs/libxfs/xfs_btree.c | 333 ++++++++++++++++++++++++++++---------
fs/xfs/libxfs/xfs_btree.h | 18 ++
fs/xfs/libxfs/xfs_btree_staging.c | 9 +
fs/xfs/libxfs/xfs_inode_fork.c | 171 ++++++-------------
fs/xfs/libxfs/xfs_inode_fork.h | 6 +
8 files changed, 446 insertions(+), 212 deletions(-)