fs stats are not updated immediately on the client,
thus we need to wait.
Test-Parameters: env=ONLY=127,ONLY_REPEAT=20 testlist=conf-sanity
Test-Parameters: env=ONLY=127,ONLY_REPEAT=20 testlist=conf-sanity
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I28cf407f9fe4df1f46af8cd88f50670bb8f0d93f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56726
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
local osc_tgt="$FSNAME-OST0000-osc-$($LFS getname -i $DIR)"
local avail1=($($LCTL get_param -n osc.${osc_tgt}.kbytesavail))
- $LFS setstripe -i 0 $DIR/$tfile || error "failed creating $DIR/$tfile"
+ wait_delete_completed
+ $LFS setstripe -i 0 -c1 $DIR/$tfile || {
+ $LFS df $DIR
+ $LCTL get_param osc.*.*grant_bytes
+ error "failed creating $DIR/$tfile"
+ }
dd if=/dev/zero of=$DIR/$tfile bs=1M oflag=direct || true
+ sleep_maxage
local avail2=($($LCTL get_param -n osc.${osc_tgt}.kbytesavail))
if ((avail2 * 100 / avail1 > 1)); then