Soft least qunit was introduced to avoid performance
drop when users have reached soft limit, but timer has
not reached, it tried to acquire more space(not more than
least qunit) to get reasonable performance.
Test cases need be aware of this, which means slave might
exceed quota limit a bit(but should not more than least qunit
eg 4M).
Lustre-change: https://review.whamcloud.com/41094
Lustre-commit:
a71382df0204fe2cd465eba3873574118f46622b
Test-Parameters: trivial testlist=sanity-quota env=ONLY="3a 3b 3c"
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: Ia221d97d158a8da4dc1fe1611aebac2f5086440e
Reviewed-on: https://review.whamcloud.com/41094
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Sergey Cheremencev <sergey.cheremencev@hpe.com>
Reviewed-on: https://review.whamcloud.com/41997
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
local OFFSET=0
local qtype=$4
local pool=$5
+ local soft_limit=$(do_facet $SINGLEMDS $LCTL get_param -n \
+ qmt.$FSNAME-QMT0000.dt-0x0.soft_least_qunit)
setup_quota_test
stack_trap cleanup_quota_test EXIT
log "Write after timer goes off"
# maybe cache write, ignore.
- $RUNAS dd if=/dev/zero of=$testfile bs=1K count=10 seek=$OFFSET || true
- OFFSET=$((OFFSET + 1024))
+ # write up to soft least quint to consume all
+ # possible slave granted space.
+ $RUNAS dd if=/dev/zero of=$testfile bs=1K \
+ count=$soft_limit seek=$OFFSET || true
+ OFFSET=$((OFFSET + soft_limit))
cancel_lru_locks osc
log "Write after cancel lru locks"
$RUNAS dd if=/dev/zero of=$testfile bs=1K count=10 seek=$OFFSET &&