Whamcloud - gitweb
LU-18468 tests: write PAGE_SIZE for sanity-flr/211 22/58122/3
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 19 Feb 2025 00:04:35 +0000 (17:04 -0700)
committerOleg Drokin <green@whamcloud.com>
Fri, 28 Feb 2025 08:10:07 +0000 (08:10 +0000)
Do not write smaller than PAGE_SIZE (=64KiB on aarch64/ppc64) when
using "dd oflag=direct" for sanity-flr test_211.  Otherwise, this
will fail on clients/servers that do not support unaligned direct IO.

Test-Parameters: trivial
Test-Parameters: testlist=sanity-flr env=ONLY=211 clientarch=aarch64 clientdistro=el9.3 serverversion=2.14
Fixes: b5db891cad ("LU-18468 llapi: always truncate mirrors on resync")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ia102b99e1303bb24114e58ecc129fe27a198135e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58122
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-flr.sh

index f69bbee..e11bb1a 100644 (file)
@@ -4566,13 +4566,13 @@ run_test 210b "handle broken mirrored lovea (unlink)"
 test_211() {
        local tf=$DIR/$tfile
 
-       dd if=/dev/zero of=$tf bs=4k count=10 oflag=direct ||
+       dd if=/dev/zero of=$tf bs=$PAGE_SIZE count=10 oflag=direct ||
                error "error writing initial data to '$tf'"
 
        $LFS mirror extend -N $tf || error "error extending mirror for '$tf'"
 
-       dd if=/dev/zero of=$tf bs=4k count=1 oflag=direct ||
-               error "error writing 4k to '$tf'"
+       dd if=/dev/zero of=$tf bs=$PAGE_SIZE count=1 oflag=direct ||
+               error "error writing $((PAGE_SIZE/1024))k to '$tf'"
        echo "size after second write"
        ls -la $tf
        md5_1=$(md5sum $tf) || error "error getting first md5sum of '$tf'"