break;
case XFROG_SCRUB_GROUP_METAPATH:
meta.sm_ino = control;
+ meta.sm_agno = control2;
break;
case XFROG_SCRUB_GROUP_INODE:
meta.sm_ino = control;
switch (d->group) {
case XFROG_SCRUB_GROUP_METAPATH:
- if (optind == argc - 1) {
+ if (optind == argc - 1 || optind == argc - 2) {
bool set = false;
for (i = 0; i < XFS_SCRUB_METAPATH_NR; i++) {
return 0;
}
}
+
+ if (xfrog_metapaths[control].group == XFROG_SCRUB_GROUP_RTGROUP) {
+ if (optind == argc - 1) {
+ fprintf(stderr,
+ _("%s: Metapath requires an rtgroup number.\n"),
+ xfrog_metapaths[control].name);
+ return 0;
+ }
+ control2 = strtoul(argv[optind + 1], &p, 0);
+ if (*p != '\0') {
+ fprintf(stderr,
+ _("Bad rtgroup number '%s'.\n"),
+ argv[optind + 1]);
+ return 0;
+ }
+ } else {
+ if (optind == argc - 2) {
+ fprintf(stderr,
+ _("%s: Metapath does not take a second argument.\n"),
+ xfrog_metapaths[control].name);
+ return 0;
+ }
+ }
} else {
fprintf(stderr, _("Must specify metapath number.\n"));
return 0;
break;
case XFROG_SCRUB_GROUP_METAPATH:
meta.sm_ino = control;
+ meta.sm_agno = control2;
break;
case XFROG_SCRUB_GROUP_INODE:
meta.sm_ino = control;
.RE
.PD
.TP
-.BI "scrub " type " [ " agnumber " | " rgnumber " | " "ino" " " "gen" " | " metapath " ]"
+.BI "scrub " type " [ " agnumber " | " rgnumber " | " "ino" " " "gen" " | " metapath " [ " rgnumber " ] ]"
Scrub internal XFS filesystem metadata. The
.BI type
parameter specifies which type of metadata to scrub.
For file metadata, the scrub is applied to the open file unless the
inode number and generation number are specified.
For metapath, the name of a file or a raw number must be specified.
+If the metapath file is a per-rtgroup file, the group number must be specified.
.RE
.PD
.TP