diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-07-14 11:06:32 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2022-11-09 19:07:35 -0800 |
commit | 37c015cada4df6aeb7efae7c95304e718eea5535 (patch) | |
tree | d02856d76525040a888fd06ba27fb578f4767a3d /fs/xfs/scrub/trace.c | |
parent | ec100ee02c1cbe0b667d9a079367d8753146345f (diff) |
xfs: connect in-memory btrees to xfilesin-memory-btrees_2022-11-09
Add to our stubbed-out in-memory btrees the ability to connect them with
an actual in-memory backing file (aka xfiles) and the necessary pieces
to track free space in the xfile and flush dirty xfbtree buffers on
demand, which we'll need for online repair.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/scrub/trace.c')
-rw-r--r-- | fs/xfs/scrub/trace.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/xfs/scrub/trace.c b/fs/xfs/scrub/trace.c index 08e05d49e7c0..177fc4c75507 100644 --- a/fs/xfs/scrub/trace.c +++ b/fs/xfs/scrub/trace.c @@ -12,15 +12,19 @@ #include "xfs_mount.h" #include "xfs_inode.h" #include "xfs_btree.h" +#include "xfs_btree_mem.h" #include "xfs_ag.h" #include "xfs_quota_defs.h" #include "xfs_dir2.h" +#include "xfs_da_format.h" +#include "xfs_btree_mem.h" #include "scrub/scrub.h" #include "scrub/xfile.h" #include "scrub/xfarray.h" #include "scrub/iscan.h" #include "scrub/nlinks.h" #include "scrub/fscounters.h" +#include "scrub/xfbtree.h" /* Figure out which block the btree cursor was pointing to. */ static inline xfs_fsblock_t @@ -39,6 +43,15 @@ xchk_btree_cur_fsbno( return NULLFSBLOCK; } +#ifdef CONFIG_XFS_IN_MEMORY_BTREE +static inline unsigned long +xfbtree_ino( + struct xfbtree *xfbt) +{ + return file_inode(xfbt->target->bt_xfile->file)->i_ino; +} +#endif /* CONFIG_XFS_IN_MEMORY_BTREE */ + /* * We include this last to have the helpers above available for the trace * event implementations. |