@@ -379,6 +379,11 @@ uuid_f(
progname);
return 0;
}
+ if (xfs_sb_version_needsrepair(&mp->m_sb)) {
+ dbprintf(_("%s: filesystem needs xfs_repair\n"),
+ progname);
+ return 0;
+ }
if (!strcasecmp(argv[1], "generate")) {
platform_uuid_generate(&uu);
@@ -543,6 +548,12 @@ label_f(
return 0;
}
+ if (xfs_sb_version_needsrepair(&mp->m_sb)) {
+ dbprintf(_("%s: filesystem needs xfs_repair\n"),
+ progname);
+ return 0;
+ }
+
dbprintf(_("writing all SBs\n"));
for (ag = 0; ag < mp->m_sb.sb_agcount; ag++)
if ((p = do_label(ag, argv[1])) == NULL) {