/* Step 3: write updates to other MDTs */
if (write_updates) {
struct llog_update_record *lur;
+ if (OBD_FAIL_PRECHECK(OBD_FAIL_OUT_OBJECT_MISS)) {
+ if (cfs_fail_val == 1) {
+ long timeout = cfs_time_seconds(1) / 10;
+
+ OBD_RACE(OBD_FAIL_OUT_OBJECT_MISS);
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ schedule_timeout(schedule_timeout(timeout));
+ cfs_fail_loc = 0;
+ }
+ cfs_fail_val++;
+ }
/* Stop callback of master will add more updates and also update
* master transno, so merge the parameters and updates into one
struct sub_thandle *st;
ENTRY;
+ if (OBD_FAIL_CHECK(OBD_FAIL_TGT_TXN_NO_CANCEL))
+ RETURN(0);
+
top_multiple_thandle_dump(tmt, D_INFO);
/* Cancel update logs on other MDTs */
list_for_each_entry(st, &tmt->tmt_sub_thandle_list, st_sub_list) {
struct distribute_txn_bid_data *dtbd = NULL;
struct target_distribute_txn_data *tdtd;
- dtbd = container_of0(cb, struct distribute_txn_bid_data, dtbd_cb);
+ dtbd = container_of(cb, struct distribute_txn_bid_data, dtbd_cb);
tdtd = dtbd->dtbd_tdtd;
CDEBUG(D_HA, "%s: %llu batchid updated\n",
tdtd->tdtd_committed_batchid);
/* update globally committed on a storage */
if (batchid > tdtd->tdtd_committed_batchid) {
- __set_current_state(TASK_RUNNING);
rc = distribute_txn_commit_batchid_update(env, tdtd,
batchid);
if (rc == 0)
top_multiple_thandle_put(tmt);
}
- if (current->state)
+ if (!task_is_running(current))
schedule();
+
+ if (OBD_FAIL_PRECHECK(OBD_FAIL_OUT_OBJECT_MISS)) {
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ schedule_timeout(cfs_time_seconds(5));
+ }
}
while (({set_current_state(TASK_IDLE);