@@ -166,12 +166,13 @@ phase2_func(
}
/*
- * In case we ever use the primary super scrubber to perform fs
- * upgrades (followed by a full scrub), do that before we launch
- * anything else.
+ * Scrub primary superblock. This will be useful if we ever need to
+ * hook a filesystem-wide pre-scrub activity (e.g. enable filesystem
+ * upgrades) off of the sb 0 scrubber (which currently does nothing).
+ * If errors occur, this function will log them and return nonzero.
*/
action_list_init(&alist);
- ret = scrub_primary_super(ctx, &alist);
+ ret = scrub_meta_type(ctx, XFS_SCRUB_TYPE_SB, 0, &alist);
if (ret)
goto out_wq;
ret = action_list_process(ctx, -1, &alist,
@@ -259,7 +259,7 @@ scrub_save_repair(
* Returns 0 for success. If errors occur, this function will log them and
* return a positive error code.
*/
-static int
+int
scrub_meta_type(
struct scrub_ctx *ctx,
unsigned int type,
@@ -325,20 +325,6 @@ scrub_group(
return 0;
}
-/*
- * Scrub primary superblock. This will be useful if we ever need to hook
- * a filesystem-wide pre-scrub activity off of the sb 0 scrubber (which
- * currently does nothing). If errors occur, this function will log them and
- * return nonzero.
- */
-int
-scrub_primary_super(
- struct scrub_ctx *ctx,
- struct action_list *alist)
-{
- return scrub_meta_type(ctx, XFS_SCRUB_TYPE_SB, 0, alist);
-}
-
/* Scrub each AG's header blocks. */
int
scrub_ag_headers(
@@ -17,7 +17,6 @@ enum check_outcome {
struct action_item;
void scrub_report_preen_triggers(struct scrub_ctx *ctx);
-int scrub_primary_super(struct scrub_ctx *ctx, struct action_list *alist);
int scrub_ag_headers(struct scrub_ctx *ctx, xfs_agnumber_t agno,
struct action_list *alist);
int scrub_ag_metadata(struct scrub_ctx *ctx, xfs_agnumber_t agno,
@@ -30,6 +29,8 @@ int scrub_fs_counters(struct scrub_ctx *ctx, struct action_list *alist);
int scrub_quotacheck(struct scrub_ctx *ctx, struct action_list *alist);
int scrub_nlinks(struct scrub_ctx *ctx, struct action_list *alist);
int scrub_clean_health(struct scrub_ctx *ctx, struct action_list *alist);
+int scrub_meta_type(struct scrub_ctx *ctx, unsigned int type,
+ xfs_agnumber_t agno, struct action_list *alist);
bool can_scrub_fs_metadata(struct scrub_ctx *ctx);
bool can_scrub_inode(struct scrub_ctx *ctx);