[ndctl] ndctl/test: Add xfs reflink dependency
diff mbox series

Message ID 156531368129.2136155.4247732841095137080.stgit@dwillia2-desk3.amr.corp.intel.com
State New
Headers show
Series
  • [ndctl] ndctl/test: Add xfs reflink dependency
Related show

Commit Message

Dan Williams Aug. 9, 2019, 1:21 a.m. UTC
Starting with xfsprogs version 5.1.0 it will enable reflink by default.
Any scripts, like ndctl unit tests, that were doing:

    mkfs.xfs $pmem; mount -o dax $pmem $mnt

...must now do:

    mkfs.xfs -m reflink=0 $pmem; mount -o dax $pmem $mnt

Cc: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 test/dax.sh  |    4 ++--
 test/mmap.sh |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Jeff Moyer Aug. 12, 2019, 2:03 p.m. UTC | #1
Dan Williams <dan.j.williams@intel.com> writes:

> Starting with xfsprogs version 5.1.0 it will enable reflink by default.
> Any scripts, like ndctl unit tests, that were doing:
>
>     mkfs.xfs $pmem; mount -o dax $pmem $mnt
>
> ...must now do:
>
>     mkfs.xfs -m reflink=0 $pmem; mount -o dax $pmem $mnt

Agreed.  In the future, the options may not be mutually exclusive, but I
don't see any harm in always testing with reflink=0 for the existing
tests.

Acked-by: Jeff Moyer <jmoyer@redhat.com>

>
> Cc: Jeff Moyer <jmoyer@redhat.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
>  test/dax.sh  |    4 ++--
>  test/mmap.sh |    2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/test/dax.sh b/test/dax.sh
> index e703e1222dee..3bb44ac0a26c 100755
> --- a/test/dax.sh
> +++ b/test/dax.sh
> @@ -69,7 +69,7 @@ json=$($NDCTL create-namespace -m raw -f -e $dev)
>  eval $(json2var <<< "$json")
>  [ $mode != "fsdax" ] && echo "fail: $LINENO" &&  exit 1
>  
> -mkfs.xfs -f /dev/$blockdev
> +mkfs.xfs -f /dev/$blockdev -m reflink=0
>  mount /dev/$blockdev $MNT -o dax
>  fallocate -l 1GiB $MNT/$FILE
>  run_test
> @@ -80,7 +80,7 @@ json=$($NDCTL create-namespace -m fsdax -M dev -f -e $dev)
>  eval $(json2var <<< "$json")
>  [ $mode != "fsdax" ] && echo "fail: $LINENO" &&  exit 1
>  
> -mkfs.xfs -f /dev/$blockdev
> +mkfs.xfs -f /dev/$blockdev -m reflink=0
>  mount /dev/$blockdev $MNT -o dax
>  fallocate -l 1GiB $MNT/$FILE
>  run_test
> diff --git a/test/mmap.sh b/test/mmap.sh
> index afe50fd2199b..d072ea289f31 100755
> --- a/test/mmap.sh
> +++ b/test/mmap.sh
> @@ -70,7 +70,7 @@ fallocate -l 1GiB $MNT/$FILE
>  test_mmap
>  umount $MNT
>  
> -mkfs.xfs -f $DEV
> +mkfs.xfs -f $DEV -m reflink=0
>  mount $DEV $MNT -o dax
>  fallocate -l 1GiB $MNT/$FILE
>  test_mmap

Patch
diff mbox series

diff --git a/test/dax.sh b/test/dax.sh
index e703e1222dee..3bb44ac0a26c 100755
--- a/test/dax.sh
+++ b/test/dax.sh
@@ -69,7 +69,7 @@  json=$($NDCTL create-namespace -m raw -f -e $dev)
 eval $(json2var <<< "$json")
 [ $mode != "fsdax" ] && echo "fail: $LINENO" &&  exit 1
 
-mkfs.xfs -f /dev/$blockdev
+mkfs.xfs -f /dev/$blockdev -m reflink=0
 mount /dev/$blockdev $MNT -o dax
 fallocate -l 1GiB $MNT/$FILE
 run_test
@@ -80,7 +80,7 @@  json=$($NDCTL create-namespace -m fsdax -M dev -f -e $dev)
 eval $(json2var <<< "$json")
 [ $mode != "fsdax" ] && echo "fail: $LINENO" &&  exit 1
 
-mkfs.xfs -f /dev/$blockdev
+mkfs.xfs -f /dev/$blockdev -m reflink=0
 mount /dev/$blockdev $MNT -o dax
 fallocate -l 1GiB $MNT/$FILE
 run_test
diff --git a/test/mmap.sh b/test/mmap.sh
index afe50fd2199b..d072ea289f31 100755
--- a/test/mmap.sh
+++ b/test/mmap.sh
@@ -70,7 +70,7 @@  fallocate -l 1GiB $MNT/$FILE
 test_mmap
 umount $MNT
 
-mkfs.xfs -f $DEV
+mkfs.xfs -f $DEV -m reflink=0
 mount $DEV $MNT -o dax
 fallocate -l 1GiB $MNT/$FILE
 test_mmap