Improve sanity test_253: set high watermark to 50M, and fill OST with
fallocate.
Test-Parameters: trivial
Test-Parameters: testlist=sanity,sanity,sanity,sanity,sanity,sanity,sanity env=EXCEPT=77c
Test-Parameters: testlist=sanity,sanity,sanity,sanity,sanity,sanity,sanity env=EXCEPT=77c
Test-Parameters: testlist=sanity,sanity,sanity,sanity,sanity,sanity,sanity env=EXCEPT=77c
Test-Parameters: testlist=sanity,sanity,sanity,sanity,sanity,sanity,sanity env=EXCEPT=77c
Test-Parameters: testlist=sanity,sanity,sanity,sanity,sanity,sanity,sanity env=EXCEPT=77c
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I85139d7fc0697d08c21bdb19432b40c8dab82ee9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53548
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
[ $PARALLEL == "yes" ] && skip "skip parallel run"
remote_mds_nodsh && skip "remote MDS with nodsh"
remote_mgs_nodsh && skip "remote MGS with nodsh"
+ check_set_fallocate_or_skip
local ostidx=0
local rc=0
dd if=/dev/zero of=$DIR/$tdir/$tfile.0 bs=1M count=10
- local wms=$(ost_watermarks_set_enospc $tfile $ostidx |
- grep "watermarks")
- stack_trap "ost_watermarks_clear_enospc $tfile $ostidx $wms" EXIT
+ local wms=$(ost_watermarks_get $ostidx)
+
+ ost_watermarks_set $ostidx 60 50
+ stack_trap "ost_watermarks_set $ostidx $wms"
+
+ local free_kb=$($LFS df $MOUNT | awk "/$ost_name/ { print \$4 }")
+ local size=$((free_kb * 1024))
+
+ fallocate -l $size $DIR/$tdir/fill_ost$ostidx ||
+ error "fallocate failed"
+ sleep_maxage
local oa_status=$(do_facet $SINGLEMDS $LCTL get_param -n \
osp.$mdtosc_proc1.prealloc_status)
oflag=append || error "Append failed"
rm -f $DIR/$tdir/$tfile.0
-
- # For this test, we want to delete the files we created to go out of
- # space but leave the watermark, so we remain nearly out of space
- ost_watermarks_enospc_delete_files $tfile $ostidx
+ rm -f $DIR/$tdir/fill_ost$ostidx
wait_delete_completed
-
sleep_maxage
for i in $(seq 10 12); do