common/xfs: don't call xfs_scrub on a block device
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 22 Mar 2018 02:46:56 +0000 (19:46 -0700)
committerEryu Guan <guaneryu@gmail.com>
Fri, 23 Mar 2018 04:43:44 +0000 (12:43 +0800)
xfs_scrub takes an xfs mountpoint as its argument, not a block
device. Therefore, fix _check_xfs_filesystem to call it correctly.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/xfs

index 37cd80c6c563b4c845697c5eef70c22126cd1707..56531f914cdbed89cf6ebaeaded4314b73e969e4 100644 (file)
@@ -358,7 +358,7 @@ _check_xfs_filesystem()
        # Run online scrub if we can.
        mntpt="$(_is_dev_mounted $device)"
        if [ -n "$mntpt" ] && _supports_xfs_scrub "$mntpt" "$device"; then
-               "$XFS_SCRUB_PROG" $scrubflag -v -d -n $device > $tmp.scrub 2>&1
+               "$XFS_SCRUB_PROG" $scrubflag -v -d -n $mntpt > $tmp.scrub 2>&1
                if [ $? -ne 0 ]; then
                        _log_err "_check_xfs_filesystem: filesystem on $device failed scrub"
                        echo "*** xfs_scrub $scrubflag -v -d -n output ***" >> $seqres.full