Whamcloud - gitweb
LU-15129 tests: sanity-quota_75_dom fix 64/50164/2
authorSergey Cheremencev <scherementsev@ddn.com>
Tue, 28 Feb 2023 18:30:32 +0000 (22:30 +0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 8 Mar 2023 03:29:39 +0000 (03:29 +0000)
oflag=sync causes dd to write page by page instead
of sending several pages in RPC. Furthermore, when
granted space becomes closer to soft_limit(i.e. over
9MB if soft_limit is 10MB), OST can not preacquire
space anymore. Also OST could acquire only requested
amount of space - see qmt_alloc_expand. Thus OST has
to send quota acquire request at MDT for each BRW request
from the client. Sometimes 20 seconds is not enough to write
10MB. Change oflag=sync with conv=fsync to reduce the number
of RPCs between the client and OST and between QSDs and QMT.
One fsync at close should help to avoid timeout failure.

Test-Parameters: trivial testlist=sanity-quota
Test-Parameters: testlist=sanity-quota env=ONLY=75,ONLY_REPEAT=50
Signed-off-by: Sergey Cheremencev <scherementsev@ddn.com>
Change-Id: Iad363fdc8a0984861055c295ea9cc3f23110fd9f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50164
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-quota.sh

index 2a422df..7e388fb 100755 (executable)
@@ -5194,14 +5194,14 @@ test_dom_75() {
 
        for ((i = 0; i < $((LIMIT/2048-1)); i++)); do
                $DD of=$DIR/$tdir_dom/$tfile-$i count=1 \
-                       oflag=sync || dd_failed=true
+                       conv=fsync || dd_failed=true
        done
 
        $dd_failed && quota_error u $qid "write failed, expect succeed (1)"
 
        for ((i = $((LIMIT/2048-1)); i < $((LIMIT/1024 + 10)); i++)); do
                $DD of=$DIR/$tdir_dom/$tfile-$i count=1 \
-                       oflag=sync || dd_failed=true
+                       conv=fsync || dd_failed=true
        done
 
        $dd_failed || quota_error u $qid "write succeed, expect EDQUOT (1)"
@@ -5214,12 +5214,12 @@ test_dom_75() {
 
        dd_failed=false
 
-       $DD of=$DIR/$tdir/file count=$((LIMIT/2048-1)) oflag=sync ||
+       $DD of=$DIR/$tdir/file count=$((LIMIT/2048-1)) conv=fsync ||
                quota_error u $qid "write failed, expect succeed (2)"
 
        for ((i = 0; i < $((LIMIT/2048 + 10)); i++)); do
                $DD of=$DIR/$tdir_dom/$tfile-$i count=1 \
-                       oflag=sync || dd_failed=true
+                       conv=fsync || dd_failed=true
        done
 
        $dd_failed || quota_error u $TSTID "write succeed, expect EDQUOT (2)"
@@ -5235,12 +5235,12 @@ test_dom_75() {
 
        for ((i = 0; i < $((LIMIT/2048-1)); i++)); do
                $DD of=$DIR/$tdir_dom/$tfile-$i count=1 \
-                       oflag=sync || dd_failed=true
+                       conv=fsync || dd_failed=true
        done
 
        $dd_failed && quota_error u $qid "write failed, expect succeed (3)"
 
-       $DD of=$DIR/$tdir/file count=$((LIMIT/2048 + 10)) oflag=sync &&
+       $DD of=$DIR/$tdir/file count=$((LIMIT/2048 + 10)) conv=fsync &&
                quota_error u $qid "write succeed, expect EDQUOT (3)"
        true
 }