summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/dirtree.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/scrub/dirtree.h')
-rw-r--r--fs/xfs/scrub/dirtree.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/xfs/scrub/dirtree.h b/fs/xfs/scrub/dirtree.h
index 50fefd64ae50..2ddbcf43c291 100644
--- a/fs/xfs/scrub/dirtree.h
+++ b/fs/xfs/scrub/dirtree.h
@@ -72,6 +72,13 @@ struct xchk_dirtree {
/* Root inode that we're looking for. */
xfs_ino_t root_ino;
+ /*
+ * This is the inode that we're scanning. The live update hook can
+ * continue to be called after xchk_teardown drops sc->ip but before
+ * it calls buf_cleanup, so we keep a copy.
+ */
+ xfs_ino_t scan_ino;
+
/* Scratch buffer for scanning pptr xattrs */
struct xfs_parent_rec pptr_rec;
struct xfs_da_args pptr_args;
@@ -80,9 +87,19 @@ struct xchk_dirtree {
struct xfs_name xname;
char namebuf[MAXNAMELEN];
+ /*
+ * Hook into directory updates so that we can receive live updates
+ * from other writer threads.
+ */
+ struct xfs_dir_hook dhook;
+
/* lock for everything below here */
struct mutex lock;
+ /* buffer for the live update functions to use for dirent names */
+ struct xfs_name hook_xname;
+ unsigned char hook_namebuf[MAXNAMELEN];
+
/*
* All path steps observed during this scan. Each of the path
* steps for a particular pathwalk are recorded in sequential
@@ -106,6 +123,9 @@ struct xchk_dirtree {
/* Have the path data been invalidated by a concurrent update? */
bool stale:1;
+
+ /* Has the scan been aborted? */
+ bool aborted:1;
};
#define xchk_dirtree_for_each_path_safe(dl, path, n) \