summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
bb004b9)
- reset_enospc() to poll when precreate_status is OK
- exhaust_precreations() to wait one time, not for every OST
ONLY=27 OSTCOUNT=7 sh sanity: 641 sec before and 373 sec after
Test-Parameters: trivial testlist=sanity fstype=zfs
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I97366cb046c50223020f2161603657056a602cd5
Reviewed-on: https://review.whamcloud.com/4388
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
# OSCs keep a NOSPC flag that will be reset after ~5s (qos_maxage)
# if the OST isn't full anymore.
reset_enospc() {
# OSCs keep a NOSPC flag that will be reset after ~5s (qos_maxage)
# if the OST isn't full anymore.
reset_enospc() {
+ local ostidx=${1:-""}
+ local delay
+ local ready
+ local get_prealloc
local list=$(comma_list $(osts_nodes))
local list=$(comma_list $(osts_nodes))
- [ "$OSTIDX" ] && list=$(facet_host ost$((OSTIDX + 1)))
+ [ "$ostidx" ] && list=$(facet_host ost$((ostidx + 1)))
do_nodes $list lctl set_param fail_loc=0
do_nodes $list lctl set_param fail_loc=0
- sync # initiate all OST_DESTROYs from MDS to OST
- sleep_maxage
+ wait_delete_completed # initiate all OST_DESTROYs from MDS to OST
+ delay=$(do_facet $SINGLEMDS lctl get_param -n lov.*.qos_maxage |
+ awk '{print $1 * 2;exit;}')
+ get_prealloc="$LCTL get_param -n osc.*MDT*.prealloc_status |
+ grep -v \"^0$\""
+ wait_update_facet $SINGLEMDS "$get_prealloc" "" $delay
-exhaust_precreations() {
+__exhaust_precreations() {
local OSTIDX=$1
local FAILLOC=$2
local FAILIDX=${3:-$OSTIDX}
local OSTIDX=$1
local FAILLOC=$2
local FAILIDX=${3:-$OSTIDX}
createmany -o $DIR/$tdir/${OST}/f $next_id $((last_id - next_id + 2))
do_facet $mfacet lctl get_param osp.$mdtosc_proc2.prealloc*
do_facet $ofacet lctl set_param fail_loc=$FAILLOC
createmany -o $DIR/$tdir/${OST}/f $next_id $((last_id - next_id + 2))
do_facet $mfacet lctl get_param osp.$mdtosc_proc2.prealloc*
do_facet $ofacet lctl set_param fail_loc=$FAILLOC
+}
+
+exhaust_precreations() {
+ __exhaust_precreations $1 $2 $3
sleep_maxage
}
exhaust_all_precreations() {
local i
for (( i=0; i < OSTCOUNT; i++ )) ; do
sleep_maxage
}
exhaust_all_precreations() {
local i
for (( i=0; i < OSTCOUNT; i++ )) ; do
- exhaust_precreations $i $1 -1
+ __exhaust_precreations $i $1 -1