From: Nathaniel Clark Date: Tue, 19 Nov 2019 14:52:45 +0000 (-0500) Subject: LU-12100 tests: Use least qunit to set limit X-Git-Tag: 2.12.6-RC1~71 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F69%2F38769%2F4;p=fs%2Flustre-release.git LU-12100 tests: Use least qunit to set limit Use least qunit to set lower limit for inodes in sanity-quota/2 This ensures that the limit is set at or above the minimum size. Lustre-change: https://review.whamcloud.com/36797 Lustre-commit: 33e500cfb33406b8dddac46e1dfb5a3d59ff01c5 Test-Parameters: trivial Test-Parameters: env=ONLY=2 testlist=sanity-quota Test-Parameters: env=ONLY=2 testlist=sanity-quota fstype=zfs Test-Parameters: env=ONLY=2,ONLY_REPEAT=20 fstype=zfs testlist=sanity-quota Test-Parameters: mdtcount=2 mdscount=4 env=ONLY=2,ONLY_REPEAT=20 fstype=zfs testlist=sanity-quota Signed-off-by: Nathaniel Clark Change-Id: I80e2c3cb66870d11f74f34c435e266a46630479b Reviewed-on: https://review.whamcloud.com/36797 Reviewed-by: Jian Yu Reviewed-by: Olaf Faaland-LLNL Reviewed-on: https://review.whamcloud.com/38769 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh index 4e9f7f1..2e698e2 100755 --- a/lustre/tests/sanity-quota.sh +++ b/lustre/tests/sanity-quota.sh @@ -666,10 +666,16 @@ run_test 1 "Block hard limit (normal use and out of quota)" # test inode hardlimit test_2() { - local LIMIT=$((1024 * 1024)) # 1M inodes local TESTFILE="$DIR/$tdir/$tfile-0" + local LIMIT=$(do_facet mds1 $LCTL get_param -n \ + qmt.$FSNAME-QMT0000.md-0x0.info | + awk '/least qunit/{ print $3 }') + local L2=$(do_facet mds1 $LCTL get_param -n \ + qmt.$FSNAME-QMT0000.md-0x0.soft_least_qunit) + + [ $L2 -le $LIMIT ] || LIMIT=$L2 - [ "$SLOW" = "no" ] && LIMIT=1024 # 1k inodes + [ "$SLOW" = "no" ] || LIMIT=$((LIMIT * 1024)) local FREE_INODES=$(mdt_free_inodes 0) echo "$FREE_INODES free inodes on master MDT"