Re: no rw xfs file systems in mtab: /proc/mounts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
 		}

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux