Whamcloud - gitweb
LU-170 oscc_grow_count will never grow
[fs/lustre-release.git] / lustre / ptlrpc / recov_thread.c
index 3aac145..38c4ad7 100644 (file)
@@ -76,6 +76,10 @@ enum {
         LLOG_LCM_FL_EXIT        = 1 << 1
 };
 
+struct llcd_async_args {
+        struct llog_canceld_ctxt *la_ctxt;
+};
+
 static void llcd_print(struct llog_canceld_ctxt *llcd,
                        const char *func, int line)
 {
@@ -186,9 +190,11 @@ llcd_copy(struct llog_canceld_ctxt *llcd, struct llog_cookie *cookies)
  */
 static int
 llcd_interpret(const struct lu_env *env,
-               struct ptlrpc_request *req, void *noused, int rc)
+               struct ptlrpc_request *req, void *args, int rc)
 {
-        struct llog_canceld_ctxt *llcd = req->rq_async_args.pointer_arg[0];
+        struct llcd_async_args *la = args;
+        struct llog_canceld_ctxt *llcd = la->la_ctxt;
+
         CDEBUG(D_RPCTRACE, "Sent llcd %p (%d) - killing it\n", llcd, rc);
         llcd_free(llcd);
         return 0;
@@ -204,6 +210,7 @@ static int llcd_send(struct llog_canceld_ctxt *llcd)
         char *bufs[2] = { NULL, (char *)llcd->llcd_cookies };
         struct obd_import *import = NULL;
         struct llog_commit_master *lcm;
+        struct llcd_async_args *la;
         struct ptlrpc_request *req;
         struct llog_ctxt *ctxt;
         int rc;
@@ -268,8 +275,12 @@ static int llcd_send(struct llog_canceld_ctxt *llcd)
         /* bug 5515 */
         req->rq_request_portal = LDLM_CANCEL_REQUEST_PORTAL;
         req->rq_reply_portal = LDLM_CANCEL_REPLY_PORTAL;
+
         req->rq_interpret_reply = (ptlrpc_interpterer_t)llcd_interpret;
-        req->rq_async_args.pointer_arg[0] = llcd;
+
+        CLASSERT(sizeof(*la) <= sizeof(req->rq_async_args));
+        la = ptlrpc_req_async_args(req);
+        la->la_ctxt = llcd;
 
         /* llog cancels will be replayed after reconnect so this will do twice
          * first from replay llog, second for resended rpc */