From 7b210ef557d37fb0ae91cc0d0b1519d1d4ee25a3 Mon Sep 17 00:00:00 2001 From: anserper Date: Fri, 31 Jul 2009 16:29:33 +0000 Subject: [PATCH] b=20314 i=Johann Lombardi i=Oleg Drokin properly handle rc<0 from osc_brw_prep_request --- lustre/osc/osc_request.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 12b4be0..cbb1541 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -1648,20 +1648,21 @@ static int async_internal(int cmd, struct obd_export *exp, struct obdo *oa, page_count, pga, &request); 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); -- 1.8.3.1