summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/tempfile.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-04-16 00:54:51 +0300
committerDarrick J. Wong <djwong@kernel.org>2024-04-16 00:58:55 +0300
commitb1991ee3e7cf852e95a3498801303cfbb4468681 (patch)
treeece0ae35a9233b1a1fcb4964cbe4f8567e8daf29 /fs/xfs/scrub/tempfile.h
parent8d81082a8c9541bdf6164c4639dc1936209fe1c4 (diff)
downloadlinux-b1991ee3e7cf852e95a3498801303cfbb4468681.tar.xz
xfs: online repair of directories
If a directory looks like it's in bad shape, try to sift through the rubble to find whatever directory entries we can, scan the directory tree for the parent (if needed), stage the new directory contents in a temporary file and use the atomic extent swapping mechanism to commit the results in bulk. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/scrub/tempfile.h')
-rw-r--r--fs/xfs/scrub/tempfile.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/scrub/tempfile.h b/fs/xfs/scrub/tempfile.h
index d57e4f145a7c..e51399f595fe 100644
--- a/fs/xfs/scrub/tempfile.h
+++ b/fs/xfs/scrub/tempfile.h
@@ -35,11 +35,13 @@ int xrep_tempfile_set_isize(struct xfs_scrub *sc, unsigned long long isize);
int xrep_tempfile_roll_trans(struct xfs_scrub *sc);
void xrep_tempfile_copyout_local(struct xfs_scrub *sc, int whichfork);
+bool xrep_is_tempfile(const struct xfs_inode *ip);
#else
static inline void xrep_tempfile_iolock_both(struct xfs_scrub *sc)
{
xchk_ilock(sc, XFS_IOLOCK_EXCL);
}
+# define xrep_is_tempfile(ip) (false)
# define xrep_tempfile_rele(sc)
#endif /* CONFIG_XFS_ONLINE_REPAIR */