From: Amir Goldstein <amir73il@gmail.com>
To: "Darrick J . Wong" <darrick.wong@oracle.com>
Cc: Eric Sandeen <sandeen@sandeen.net>,
linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Subject: [PATCH] xfs_info: limit findmnt to find mounted xfs filesystems
Date: Mon, 17 Jun 2019 12:54:47 +0300 [thread overview]
Message-ID: <20190617095447.3748-1-amir73il@gmail.com> (raw)
When running xfstests with -overlay, the xfs mount point
(a.k.a $OVL_BASE_SCRATCH_MNT) is used as the $SCRATCH_DEV argument
to the overlay mount, like this:
/dev/vdf /vdf xfs rw,relatime,attr2,inode64,noquota 0 0
/vdf /vdf/ovl-mnt overlay rw,lowerdir=/vdf/lower,upperdir=/vdf/upper...
Ever since commit bbb43745, when xfs_info started using findmnt,
when calling the helper `_supports_filetype /vdf` it returns false,
and reports: "/vdf/ovl-mnt: Not on a mounted XFS filesystem".
Fix this ambiguity by preferring to query a mounted XFS filesystem,
if one can be found.
Fixes: bbb43745 ("xfs_info: use findmnt to handle mounted block devices")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
Eric,
FYI, I don't *need* to fix xfs_info in order to fix xfstests
and I do plan to send an independent fix to xfstests, but this
seems like a correct fix regardless of the specific xfstests
regression.
Thanks,
Amir.
spaceman/xfs_info.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spaceman/xfs_info.sh b/spaceman/xfs_info.sh
index 1bf6d2c3..3b10dc14 100755
--- a/spaceman/xfs_info.sh
+++ b/spaceman/xfs_info.sh
@@ -40,7 +40,7 @@ case $# in
# If we find a mountpoint for the device, do a live query;
# otherwise try reading the fs with xfs_db.
- if mountpt="$(findmnt -f -n -o TARGET "${arg}" 2> /dev/null)"; then
+ if mountpt="$(findmnt -t xfs -f -n -o TARGET "${arg}" 2> /dev/null)"; then
xfs_spaceman -p xfs_info -c "info" $OPTS "${mountpt}"
status=$?
else
--
2.17.1
next reply other threads:[~2019-06-17 9:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-17 9:54 Amir Goldstein [this message]
2019-06-17 18:22 ` [PATCH] xfs_info: limit findmnt to find mounted xfs filesystems Darrick J. Wong
2019-06-17 18:23 ` Eric Sandeen
2019-06-25 14:30 ` 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=20190617095447.3748-1-amir73il@gmail.com \
--to=amir73il@gmail.com \
--cc=darrick.wong@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@sandeen.net \
/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