From 7d05a687ee5d4f4b95585244a7f60394475fe0ba Mon Sep 17 00:00:00 2001 From: Sergey Cheremencev Date: Tue, 28 Feb 2023 22:30:32 +0400 Subject: [PATCH] LU-15129 tests: sanity-quota_75_dom fix 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 Change-Id: Iad363fdc8a0984861055c295ea9cc3f23110fd9f Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50164 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Arshad Hussain Reviewed-by: Oleg Drokin --- lustre/tests/sanity-quota.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh index 2a422df..7e388fb 100755 --- a/lustre/tests/sanity-quota.sh +++ b/lustre/tests/sanity-quota.sh @@ -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 } -- 1.8.3.1