]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
common: append -d option to XFS_COPY_PROG when testing v5 xfs
authorEryu Guan <eguan@redhat.com>
Wed, 18 Mar 2015 03:58:04 +0000 (14:58 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 18 Mar 2015 03:58:04 +0000 (14:58 +1100)
xfs_copy doesn't work on v5 xfs without -d option, this fails xfs/073
when testing xfs with MKFS_OPTIONS="-m crc=1" set.

Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
common/rc

index 23193c832ec1634131d69d0a9a51d6258ef08585..7e76d7215169d0c0193979b175df100879dd58d7 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -2926,6 +2926,11 @@ init_rc()
        # Figure out if we need to add -F ("foreign", deprecated) option to xfs_io
        xfs_io -c stat $TEST_DIR 2>&1 | grep -q "is not on an XFS filesystem" && \
        export XFS_IO_PROG="$XFS_IO_PROG -F"
+
+       # xfs_copy doesn't work on v5 xfs yet without -d option
+       if [ "$FSTYP" == "xfs" ] && [[ $MKFS_OPTIONS =~ crc=1 ]]; then
+               export XFS_COPY_PROG="$XFS_COPY_PROG -d"
+       fi
 }
 
 # get real device path name by following link