no rw xfs file systems in mtab: /proc/mounts
Christoph Hellwig
hch at infradead.org
Wed Dec 29 07:09:03 CST 2010
Can you please apply the debug patch below and see what output fsr gives
with it?
Index: xfsprogs-dev/fsr/xfs_fsr.c
===================================================================
--- xfsprogs-dev.orig/fsr/xfs_fsr.c 2010-12-29 14:02:59.618003862 +0100
+++ xfsprogs-dev/fsr/xfs_fsr.c 2010-12-29 14:04:32.795004496 +0100
@@ -405,10 +405,16 @@ initallfs(char *mtab)
while ((mp = getmntent(fp))) {
int rw = 0;
- if (strcmp(mp->mnt_type, MNTTYPE_XFS ) != 0 ||
- stat64(mp->mnt_fsname, &sb) == -1 ||
- !S_ISBLK(sb.st_mode))
+ if (strcmp(mp->mnt_type, MNTTYPE_XFS ) != 0)
continue;
+ if (stat64(mp->mnt_fsname, &sb) == -1) {
+ printf("fsr: cannot stat %s\n", mp->mnt_fsname);
+ continue;
+ }
+ if (!S_ISBLK(sb.st_mode)) {
+ printf("fsr: %s is not a block device\n", mp->mnt_fsname);
+ continue;
+ }
cp = strtok(mp->mnt_opts,",");
do {
@@ -416,8 +422,7 @@ initallfs(char *mtab)
rw++;
} while ((cp = strtok(NULL, ",")) != NULL);
if (rw == 0) {
- if (dflag)
- fsrprintf(_("Skipping %s: not mounted rw\n"),
+ printf(_("Skipping %s: not mounted rw\n"),
mp->mnt_fsname);
continue;
}
More information about the xfs
mailing list