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)
{
*/
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;
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;
/* 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 */
OBD_FREE_PTR(lpca);
RETURN(-ENODEV);
}
- rc = cfs_kernel_thread(llog_cat_process_thread, lpca,
- CLONE_VM | CLONE_FILES);
+ rc = cfs_create_thread(llog_cat_process_thread, lpca, CFS_DAEMON_FLAGS);
if (rc < 0) {
CERROR("Error starting llog_cat_process_thread(): %d\n", rc);
OBD_FREE_PTR(lpca);