From: Eric Sandeen <sandeen@redhat.com>
To: xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH] xfsprogs: skip over "rootfs" entry if mtab links to /proc/mounts
Date: Wed, 03 Aug 2011 13:41:59 -0500 [thread overview]
Message-ID: <4E399677.1010508@redhat.com> (raw)
This is for RH bug 727938, xfs_fsr regression for root file system
Fedora has made /etc/mtab a symlink to /proc/mounts, but when
we issue "xfs_fsr /" and fsr's getmntany() goes looking for
the "/" entry, the first one it finds is
rootfs / rootfs rw 0 0
it says no way, that's a rootfs filesystem type, not xfs!
And it never finds this later:
/dev/sda2 / xfs rw,relatime,attr2,noquota 0 0
This patch to skip over the rootfs entry seems to fix it.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
index 40c2e6f..eaf8ac7 100644
--- a/fsr/xfs_fsr.c
+++ b/fsr/xfs_fsr.c
@@ -1648,6 +1648,9 @@ getmntany(FILE *fp, struct mntent *mp, struct mntent *mpref, struct stat64 *s)
struct stat64 ms;
while ((t = getmntent(fp))) {
+ /* skip over "rootfs / rootfs" if mtab is really /proc/mounts */
+ if (strcmp(t->mnt_type, "rootfs") == 0)
+ continue;
if (mpref->mnt_fsname) { /* device */
if (stat64(t->mnt_fsname, &ms) < 0)
continue;
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2011-08-03 18:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-03 18:41 Eric Sandeen [this message]
2011-08-03 19:02 ` [PATCH] xfsprogs: skip over "rootfs" entry if mtab links to /proc/mounts Christoph Hellwig
2011-08-03 19:12 ` Eric Sandeen
2011-08-04 22:17 ` Eric Sandeen
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=4E399677.1010508@redhat.com \
--to=sandeen@redhat.com \
--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