From: John L. Hammond Date: Tue, 14 Nov 2017 18:23:28 +0000 (-0600) Subject: LU-8497 osp: handle remote -ENOMEM from osp_send_update_req() X-Git-Tag: 2.10.2-RC2~2 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F54%2F30354%2F2;p=fs%2Flustre-release.git LU-8497 osp: handle remote -ENOMEM from osp_send_update_req() In osp_send_update_req() detect an unsent request by checking rq_queued_time == 0 rather than rq_set == NULL, which is always true after returning from ptlrpc_queue_wait(). Lustre-change: https://review.whamcloud.com/30083 Lustre-commit: cef8983c8b5bf51b58df23a779769cc4b8ca8db5 Signed-off-by: John L. Hammond Change-Id: Ief959b71600157a9c3521775cc06994326e50c51 Reviewed-by: Fan Yong Reviewed-by: Andreas Dilger Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/30354 Tested-by: Jenkins Tested-by: Maloo --- diff --git a/lustre/osp/osp_trans.c b/lustre/osp/osp_trans.c index 5b7f694..4c62057 100644 --- a/lustre/osp/osp_trans.c +++ b/lustre/osp/osp_trans.c @@ -1183,7 +1183,10 @@ static int osp_send_update_req(const struct lu_env *env, rc = ptlrpc_queue_wait(req); if (osp->opd_connect_mdt) osp_put_rpc_lock(osp); - if ((rc == -ENOMEM && req->rq_set == NULL) || + + /* We use rq_queued_time to distinguish between local + * and remote -ENOMEM. */ + if ((rc == -ENOMEM && req->rq_queued_time == 0) || (req->rq_transno == 0 && !req->rq_committed)) { if (args->oaua_update != NULL) { /* If osp_update_interpret is not being called,