xfs: support in-memory buffer cache targets
authorDarrick J. Wong <djwong@kernel.org>
Thu, 22 Feb 2024 20:43:21 +0000 (12:43 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 22 Feb 2024 20:43:21 +0000 (12:43 -0800)
commit5076a6040ca1613e616d84aecfaac5f932db84e0
tree194bbc76321d6906f68b651b94ab1c4f48c44097
parente7b58f7c1be20550d4f51cec6307b811e7555f52
xfs: support in-memory buffer cache targets

Allow the buffer cache to target in-memory files by making it possible
to have a buftarg that maps pages from private shmem files.  As the
prevous patch alludes, the in-memory buftarg contains its own cache,
points to a shmem file, and does not point to a block_device.

The next few patches will make it possible to construct an xfs_btree in
pageable memory by using this buftarg.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/Kconfig
fs/xfs/Makefile
fs/xfs/xfs_buf.c
fs/xfs/xfs_buf.h
fs/xfs/xfs_buf_mem.c [new file with mode: 0644]
fs/xfs/xfs_buf_mem.h [new file with mode: 0644]
fs/xfs/xfs_trace.c
fs/xfs/xfs_trace.h