#define OBD_FAIL_OST_PAUSE_PUNCH 0x236
#define OBD_FAIL_OST_LADVISE_PAUSE 0x237
#define OBD_FAIL_OST_FAKE_RW 0x238
+#define OBD_FAIL_OST_LIST_ASSERT 0x239
#define OBD_FAIL_LDLM 0x300
#define OBD_FAIL_LDLM_NAMESPACE_NEW 0x301
if (*pos >= pool_tgt_count(iter->lpi_pool))
return NULL;
+ OBD_FAIL_TIMEOUT(OBD_FAIL_OST_LIST_ASSERT, cfs_fail_val);
+
/* iterate to find a non empty entry */
prev_idx = iter->lpi_idx;
iter->lpi_idx++;
}
run_test 26 "Choose other OSTs in the pool first in the creation remedy"
+test_27() {
+ [[ $OSTCOUNT -le 1 ]] && skip_env "Need at least 2 OSTs" && return
+
+ local osts
+ local pid
+ local count=$OSTCOUNT
+
+ create_pool_nofail $POOL
+ do_facet mgs lctl pool_add $FSNAME.$POOL $TGT_ALL
+ osts=$(list_pool $FSNAME.$POOL)
+ for ost in ${osts}; do
+ ((count--))
+ if [[ $count -eq 0 ]]; then
+ #define OBD_FAIL_OST_LIST_ASSERT 0x239
+ do_facet $SINGLEMDS \
+ $LCTL set_param fail_loc=0x239 fail_val=10
+ list_pool $FSNAME.$POOL &
+ pid=$!
+ sleep 5
+ do_facet $SINGLEMDS $LCTL set_param fail_loc=0
+ do_facet mgs $LCTL pool_remove $FSNAME.$POOL $ost
+ wait $pid
+ do_facet $SINGLEMDS $LCTL set_param fail_val=0
+ else
+ do_facet mgs $LCTL pool_remove $FSNAME.$POOL $ost
+ fi
+ done
+ destroy_pool $POOL
+}
+run_test 27 "Race pool_list and pool_remove"
+
cd $ORIG_PWD
complete $SECONDS