summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/repair.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-09-01 10:59:04 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-09-17 18:55:00 -0700
commit33a3a5a16e2d6dc8919cfbf879f017fd3533a44d (patch)
treeca7011d13c9db16cea443af1a5a1ba77aaaa0f2f /fs/xfs/scrub/repair.h
parent4a928b6bde47aff94e72e01b154e382d20e9aa63 (diff)
xfs: online repair of realtime summariesrepair-rtsummary_2021-09-17
Repair the realtime summary data by constructing a new rtsummary file in the scrub temporary file, then atomically swapping the contents. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/scrub/repair.h')
-rw-r--r--fs/xfs/scrub/repair.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/fs/xfs/scrub/repair.h b/fs/xfs/scrub/repair.h
index 9f9ab14abd39..15baf294ce24 100644
--- a/fs/xfs/scrub/repair.h
+++ b/fs/xfs/scrub/repair.h
@@ -22,6 +22,9 @@ static inline int xrep_notsupported(struct xfs_scrub *sc)
/* Repair helpers */
+enum xfs_blft;
+struct xbitmap;
+
int xrep_attempt(struct xfs_scrub *sc);
void xrep_failure(struct xfs_mount *mp);
int xrep_roll_ag_trans(struct xfs_scrub *sc);
@@ -36,8 +39,13 @@ int xrep_init_btblock(struct xfs_scrub *sc, xfs_fsblock_t fsb,
struct xfs_buf **bpp, xfs_btnum_t btnum,
const struct xfs_buf_ops *ops);
int xrep_setup_tempfile(struct xfs_scrub *sc, uint16_t mode);
+int xrep_fallocate(struct xfs_scrub *sc, xfs_fileoff_t off, xfs_filblks_t len);
-struct xbitmap;
+typedef int (*xrep_setfile_getbuf_fn)(struct xfs_scrub *sc,
+ xfs_fileoff_t off, struct xfs_buf **bpp);
+int xrep_set_file_contents(struct xfs_scrub *sc,
+ const struct xfs_buf_ops *ops, enum xfs_blft type,
+ xfs_fileoff_t isize);
int xrep_fix_freelist(struct xfs_scrub *sc, int alloc_flags);
int xrep_reap_extents(struct xfs_scrub *sc, struct xbitmap *exlist,
@@ -98,6 +106,12 @@ int xrep_quotacheck(struct xfs_scrub *sc);
# define xrep_quotacheck xrep_notsupported
#endif /* CONFIG_XFS_QUOTA */
+#ifdef CONFIG_XFS_RT
+int xrep_rtsummary(struct xfs_scrub *sc);
+#else
+# define xrep_rtsummary xrep_notsupported
+#endif /* CONFIG_XFS_RT */
+
struct xrep_newbt_resv {
/* Link to list of extents that we've reserved. */
struct list_head list;
@@ -213,6 +227,7 @@ xrep_rmapbt_setup(
#define xrep_quota xrep_notsupported
#define xrep_quotacheck xrep_notsupported
#define xrep_fscounters xrep_notsupported
+#define xrep_rtsummary xrep_notsupported
#endif /* CONFIG_XFS_ONLINE_REPAIR */