xfs: support in-memory btrees
authorDarrick J. Wong <djwong@kernel.org>
Thu, 22 Feb 2024 20:43:35 +0000 (12:43 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 22 Feb 2024 20:43:35 +0000 (12:43 -0800)
commita095686a2383526d7315197e2419d84ee8470217
tree74db5f2d372da134dfdf3f6a46fa337b060eaee3
parent8c1771c45dfa9dddd4569727c48204b66073d2c2
xfs: support in-memory btrees

Adapt the generic btree cursor code to be able to create a btree whose
buffers come from a (presumably in-memory) buftarg with a header block
that's specific to in-memory btrees.  We'll connect this to other parts
of online scrub in the next patches.

Note that in-memory btrees always have a block size matching the system
memory page size for efficiency reasons.  There are also a few things we
need to do to finalize a btree update; that's covered in the next patch.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 files changed:
Documentation/filesystems/xfs/xfs-online-fsck-design.rst
fs/xfs/Kconfig
fs/xfs/Makefile
fs/xfs/libxfs/xfs_btree.c
fs/xfs/libxfs/xfs_btree.h
fs/xfs/libxfs/xfs_btree_mem.c [new file with mode: 0644]
fs/xfs/libxfs/xfs_btree_mem.h [new file with mode: 0644]
fs/xfs/scrub/scrub.c
fs/xfs/scrub/scrub.h
fs/xfs/xfs_buf_mem.c
fs/xfs/xfs_buf_mem.h
fs/xfs/xfs_health.c
fs/xfs/xfs_trace.c
fs/xfs/xfs_trace.h