common/rc: Use -v option with findmnt
authorGoldwyn Rodrigues <rgoldwyn@suse.com>
Mon, 13 Mar 2017 18:07:26 +0000 (13:07 -0500)
committerEryu Guan <eguan@redhat.com>
Thu, 16 Mar 2017 07:26:08 +0000 (15:26 +0800)
commita913637bd706ad5d8bf6be423e4858cb254e7f0b
tree5894e36927656f1af6910739ae9e5788b5990dfb
parent643c6850277a2c0ecb065919e3ff44d514b83399
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 <rgoldwyn@suse.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/rc