From: anserper Date: Fri, 31 Jul 2009 16:21:57 +0000 (+0000) Subject: b=20314 X-Git-Tag: v1_8_2_01~1^2~187 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=a3af1279ee3736113db0316f1088706909ebb466;p=fs%2Flustre-release.git b=20314 i=Johann Lombardi i=Oleg Drokin properly handle rc<0 from osc_brw_prep_request --- diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 1afa5ca..1afeb13 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -1655,20 +1655,21 @@ static int async_internal(int cmd, struct obd_export *exp, struct obdo *oa, page_count, pga, &request, pshift); CLASSERT(sizeof(*aa) <= sizeof(request->rq_async_args)); - aa = ptlrpc_req_async_args(request); - if (cmd == OBD_BRW_READ) { - lprocfs_oh_tally_log2(&cli->cl_read_page_hist, page_count); - lprocfs_oh_tally(&cli->cl_read_rpc_hist, cli->cl_r_in_flight); - } else { - lprocfs_oh_tally_log2(&cli->cl_write_page_hist, page_count); - lprocfs_oh_tally(&cli->cl_write_rpc_hist, - cli->cl_w_in_flight); - } - ptlrpc_lprocfs_brw(request, aa->aa_requested_nob); - - LASSERT(list_empty(&aa->aa_oaps)); if (rc == 0) { + aa = ptlrpc_req_async_args(request); + if (cmd == OBD_BRW_READ) { + lprocfs_oh_tally_log2(&cli->cl_read_page_hist, page_count); + lprocfs_oh_tally(&cli->cl_read_rpc_hist, cli->cl_r_in_flight); + } else { + lprocfs_oh_tally_log2(&cli->cl_write_page_hist, page_count); + lprocfs_oh_tally(&cli->cl_write_rpc_hist, + cli->cl_w_in_flight); + } + ptlrpc_lprocfs_brw(request, aa->aa_requested_nob); + + LASSERT(list_empty(&aa->aa_oaps)); + request->rq_interpret_reply = brw_interpret; ptlrpc_set_add_req(set, request); client_obd_list_lock(&cli->cl_loi_list_lock);