- /* A brief note on the recovery story here:
- *
- * Each obd_brw gets its own io_cb_data, and they're all fused into a
- * single allocation (cb_data). The lov_osc_brw_callback invocation
- * that results from each obd_brw's underlying bulk send/recv completing
- * will mark that io_cb_data as complete, and decrement the
- * lbc_remaining count in the LOV's "master" callback data.
- *
- * The LOV will go to sleep as soon as all the (async) obd_brws have
- * been started. lov_osc_brw_callback will wake it up iff all OSCs have
- * completed (lbc_remaining has reached zero). If the timeout expires,
- * the LOV will walk the cb_data vector and initiate recovery on any
- * connection associated with an as-yet-incomplete desc.
- */
-
- /* XXX Make sure that the callback doesn't block here, by faking
- * XXX "completion". This is very very gross, and we might be
- * XXX better off just not calling the callback at all.
- */
- cbd->complete = 1;
- (void)callback(cbd, 0, CB_PHASE_START);
- /* XXX Watch us ignore the return code! */
-
- lwi = LWI_TIMEOUT_INTR(obd_timeout * HZ, NULL, NULL, NULL);
- rc = l_wait_event(lbc.lbc_waitq, atomic_read(&lbc.lbc_remaining) == 0,
- &lwi);
-
- for (i = 0; i < oa_bufs; i++) {
- if (stripeinfo[i].bufct == 0)
- continue;
-
- if (!cb_data[i].complete) {
- CERROR("invoking recovery for OSC %s: %d\n",
- lov->tgts[stripeinfo[i].ost_idx].uuid, rc);
- recovd_conn_fail(cb_data[i].desc->bd_connection);
- }
- ptlrpc_bulk_decref(cb_data[i].desc);
- }
-
- (void)callback(cbd, 0, CB_PHASE_FINISH);
- /* XXX We need an error reporting/bytes-written story here, statim. */
-
- rc = 0;