[ndctl,1/2] test/dax.sh: Make dax.sh more robust vs small namespaces
diff mbox series

Message ID 157205198226.4128114.4933188611203174148.stgit@dwillia2-desk3.amr.corp.intel.com
State Accepted
Commit 316c555b8888401af342744ec878c5421267d3c4
Headers show
Series
  • test/dax.sh: fixup and split by fs
Related show

Commit Message

Dan Williams Oct. 26, 2019, 1:06 a.m. UTC
If the namespace returned by test/dax-dev is too small ext4 may default
to a 1K block-size. A 1K block-size precludes dax operation, so force a
4K block-size in all cases.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 test/dax.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/test/dax.sh b/test/dax.sh
index 45c2027494e8..44bc6436a4a9 100755
--- a/test/dax.sh
+++ b/test/dax.sh
@@ -68,7 +68,7 @@  json=$($NDCTL list -N -n $dev)
 eval $(json2var <<< "$json")
 rc=1
 
-mkfs.ext4 /dev/$blockdev
+mkfs.ext4 -b 4096 /dev/$blockdev
 mount /dev/$blockdev $MNT -o dax
 fallocate -l 1GiB $MNT/$FILE
 run_test $LINENO
@@ -80,7 +80,7 @@  eval $(json2var <<< "$json")
 [ $mode != "fsdax" ] && echo "fail: $LINENO" &&  exit 1
 
 #note the blockdev returned from ndctl create-namespace lacks the /dev prefix
-mkfs.ext4 /dev/$blockdev
+mkfs.ext4 -b 4096 /dev/$blockdev
 mount /dev/$blockdev $MNT -o dax
 fallocate -l 1GiB $MNT/$FILE
 run_test $LINENO