On Fri, Mar 10, 2017 at 09:43:36AM +0200, Amir Goldstein wrote: > On Fri, Mar 10, 2017 at 8:33 AM, Eryu Guan <eguan@xxxxxxxxxx> wrote: > > Doing 'grep -F "$dev on "' to find the mounted device is not > > always accurate, e.g. > > > > SCRATCH_DEV=/vda6 is mounted but not on SCRATCH_MNT=/vda6/ovl-mnt - aborting > > Already mounted result: > > /dev/vda6 on /vda6 type xfs (rw,relatime,context=system_u:object_r:nfs_t:s0,attr2,inode64,noquota) > > > > Fix it by using findmnt command and specifying the $dev as mount > > source, print the result in "$dev $mnt" format. This works for local > > filesystems, network filesystems and overlayfs, avoids all kinds of > > tricky and error-prone grep pattern/regex. > > > > Also fixed the if-then-fi format in _check_mounted_on() while we're > > at it. > > > > Signed-off-by: Eryu Guan <eguan@xxxxxxxxxx> > > --- > > Looks good. Also passed my kvm-xfstests -c overlay run. Thanks! Can I take it as a Reviewed-by tag? Eryu -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html