From: Goldwyn Rodrigues Date: Mon, 13 Mar 2017 18:07:26 +0000 (-0500) Subject: common/rc: Use -v option with findmnt X-Git-Tag: v2022.05.01~2118 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a913637bd706ad5d8bf6be423e4858cb254e7f0b;p=xfstests-dev.git common/rc: Use -v option with findmnt Since btrfs puts in the subvol name in the device, we should use -v option to not print the bind mounts or btrfs volumes. Otherwise if a new subvolume is set as the default volume to be mounted, as what btrfs/009 does, then next _require_scratch fails SCRATCH_DEV=/dev/vdc is mounted but not on SCRATCH_MNT=/scratch - aborting Already mounted result: /dev/vdc[/newvol] /scratch [eguan: update commit log a bit, add failure example] Fixes: 5e6892d ("common/rc: use findmnt to check mounted device") Signed-off-by: Goldwyn Rodrigues Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/common/rc b/common/rc index d53f6796..d7a53215 100644 --- a/common/rc +++ b/common/rc @@ -1463,7 +1463,7 @@ _check_mounted_on() local type=$5 # find $dev as the source, and print result in "$dev $mnt" format - local mount_rec=`findmnt -rnc -S $dev -o SOURCE,TARGET` + local mount_rec=`findmnt -rncv -S $dev -o SOURCE,TARGET` [ -n "$mount_rec" ] || return 1 # 1 = not mounted # if it's mounted, make sure its on $mnt