aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_buf_mem.h
diff options
context:
space:
mode:
authorGravatar Darrick J. Wong <djwong@kernel.org> 2024-02-22 12:43:35 -0800
committerGravatar Darrick J. Wong <djwong@kernel.org> 2024-02-22 12:43:35 -0800
commita095686a2383526d7315197e2419d84ee8470217 (patch)
tree74db5f2d372da134dfdf3f6a46fa337b060eaee3 /fs/xfs/xfs_buf_mem.h
parentxfs: add a xfs_btree_ptrs_equal helper (diff)
downloadlinux-a095686a2383526d7315197e2419d84ee8470217.tar.gz
linux-a095686a2383526d7315197e2419d84ee8470217.tar.bz2
linux-a095686a2383526d7315197e2419d84ee8470217.zip
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>
Diffstat (limited to 'fs/xfs/xfs_buf_mem.h')
-rw-r--r--fs/xfs/xfs_buf_mem.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_buf_mem.h b/fs/xfs/xfs_buf_mem.h
index 945f4b610998..dfb3029113ff 100644
--- a/fs/xfs/xfs_buf_mem.h
+++ b/fs/xfs/xfs_buf_mem.h
@@ -21,10 +21,12 @@ void xmbuf_free(struct xfs_buftarg *btp);
int xmbuf_map_page(struct xfs_buf *bp);
void xmbuf_unmap_page(struct xfs_buf *bp);
+bool xmbuf_verify_daddr(struct xfs_buftarg *btp, xfs_daddr_t daddr);
#else
# define xfs_buftarg_is_mem(...) (false)
# define xmbuf_map_page(...) (-ENOMEM)
# define xmbuf_unmap_page(...) ((void)0)
+# define xmbuf_verify_daddr(...) (false)
#endif /* CONFIG_XFS_MEMORY_BUFS */
#endif /* __XFS_BUF_MEM_H__ */