summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/iscan.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-09-01 10:45:58 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-09-17 18:54:53 -0700
commite5601cfade763c332b879588e1a8a72f5af3a989 (patch)
treec96554c1bc426ceecb3bb26405ebe066cf0b5def /fs/xfs/scrub/iscan.h
parent03f4db65226a4fd8c62e54b84899e542336dd8a5 (diff)
xfs: track quota updates during live quotacheck
Create a shadow dqtrx system in the quotacheck code that hooks the regular dquot counter update code. This will be the means to keep our copy of the dquot counters up to date while the scan runs in real time. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/scrub/iscan.h')
-rw-r--r--fs/xfs/scrub/iscan.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/xfs/scrub/iscan.h b/fs/xfs/scrub/iscan.h
index 8d3ef186fa94..9b06a6e23893 100644
--- a/fs/xfs/scrub/iscan.h
+++ b/fs/xfs/scrub/iscan.h
@@ -66,4 +66,11 @@ xchk_iscan_mark_locked(struct xchk_iscan *iscan, struct xfs_inode *ip)
iscan->marked_ino = ip->i_ino;
}
+/* Decide if this inode was previously scanned. */
+static inline bool
+xchk_iscan_marked(struct xchk_iscan *iscan, struct xfs_inode *ip)
+{
+ return iscan->marked_ino >= ip->i_ino;
+}
+
#endif /* __XFS_SCRUB_ISCAN_H__ */