Add a sanity check that the passed in mount point is actually mounted
to guard against actually calling _supports_xfs_scrub before
$SCRATCH_MNT is mounted.
Signed-off-by: Christoph Hellwig <hch@lst.de>
test "$FSTYP" = "xfs" || return 1
test -x "$XFS_SCRUB_PROG" || return 1
+ mountpoint $mountpoint >/dev/null || \
+ _fail "$mountpoint is not mounted"
+
# Probe for kernel support...
$XFS_IO_PROG -c 'help scrub' 2>&1 | grep -q 'types are:.*probe' || return 1
$XFS_IO_PROG -c "scrub probe" "$mountpoint" 2>&1 | grep -q "Inappropriate ioctl" && return 1