public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Honza Fikar <j.fikar@gmail.com>
Cc: Eric Sandeen <sandeen@sandeen.net>, xfs@oss.sgi.com
Subject: Re: no rw xfs file systems in mtab: /proc/mounts
Date: Wed, 29 Dec 2010 08:09:03 -0500	[thread overview]
Message-ID: <20101229130903.GD1035@infradead.org> (raw)
In-Reply-To: <4D138457.8020008@gmail.com>

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@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2010-12-29 13:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-23 12:32 no rw xfs file systems in mtab: /proc/mounts Honza Fikar
2010-12-23 15:02 ` Eric Sandeen
2010-12-23 17:18   ` Honza Fikar
2010-12-29 13:09     ` Christoph Hellwig [this message]
2011-01-10 15:55       ` Honza Fikar
2011-01-10 18:50         ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101229130903.GD1035@infradead.org \
    --to=hch@infradead.org \
    --cc=j.fikar@gmail.com \
    --cc=sandeen@sandeen.net \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox