diff --git a/lustre/ChangeLog b/lustre/ChangeLog index dd69bee7b5ea1bc1d4aa5d0febd1860131e1f826..2c9431ae1a57dde4a68d674dd6ac6b2f518f577a 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -1680,6 +1680,12 @@ Bugzilla : 16450 Description: Kill obd_set_fail_loc(). Details : Remove unused code. +Severity : normal +Bugzilla : 16450 +Description: Add special type for ptlrpc_request interpret functions. +Details : Add lu_env parameter to ->rq_interpreter call-back. NULL is passed + there. Actual usage will be in CLIO. + -------------------------------------------------------------------------------- 2007-08-10 Cluster File Systems, Inc. <info@clusterfs.com> diff --git a/lustre/include/lustre_net.h b/lustre/include/lustre_net.h index a1bd77a104a07726972186a899b8109d14f7f06f..7ff653c0cb238ab4ffc4902a8065b40b63ef95d0 100644 --- a/lustre/include/lustre_net.h +++ b/lustre/include/lustre_net.h @@ -296,6 +296,11 @@ enum rq_phase { RQ_PHASE_COMPLETE = 0xebc0de04, }; +/** Type of request interpreter call-back */ +typedef int (*ptlrpc_interpterer_t)(const struct lu_env *env, + struct ptlrpc_request *req, + void *arg, int rc); + struct ptlrpc_request_pool { spinlock_t prp_lock; struct list_head prp_req_list; /* list of ptlrpc_request structs */ @@ -742,6 +747,10 @@ struct ptlrpcd_ctl { * Thread name used in cfs_daemonize() */ char pc_name[16]; + /** + * Environment for request interpreters to run in. + */ + struct lu_env pc_env; #ifndef __KERNEL__ /** * Async rpcs flag to make sure that ptlrpcd_check() is called only @@ -865,7 +874,7 @@ struct ptlrpc_request_set *ptlrpc_prep_set(void); int ptlrpc_set_add_cb(struct ptlrpc_request_set *set, set_interpreter_func fn, void *data); int ptlrpc_set_next_timeout(struct ptlrpc_request_set *); -int ptlrpc_check_set(struct ptlrpc_request_set *set); +int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set); int ptlrpc_set_wait(struct ptlrpc_request_set *); int ptlrpc_expired_set(void *data); void ptlrpc_interrupted_set(void *data); diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index 7edf62f4c72cab76cd52ea66a71982539ae58f5b..c12c3c6ac315d38740cc581d24d6cb9174adc833 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -543,7 +543,8 @@ static int ldlm_handle_ast_error(struct ldlm_lock *lock, return rc; } -static int ldlm_cb_interpret(struct ptlrpc_request *req, void *data, int rc) +static int ldlm_cb_interpret(const struct lu_env *env, + struct ptlrpc_request *req, void *data, int rc) { struct ldlm_cb_set_arg *arg; struct ldlm_lock *lock; diff --git a/lustre/ldlm/ldlm_request.c b/lustre/ldlm/ldlm_request.c index 045b77982fd630ef2a2378562d17d325527e60cb..44f5fb2a93a65ec4b0f7ab56dcddfa3761b55bec 100644 --- a/lustre/ldlm/ldlm_request.c +++ b/lustre/ldlm/ldlm_request.c @@ -2022,7 +2022,8 @@ static int ldlm_chain_lock_for_replay(struct ldlm_lock *lock, void *closure) return LDLM_ITER_CONTINUE; } -static int replay_lock_interpret(struct ptlrpc_request *req, +static int replay_lock_interpret(const struct lu_env *env, + struct ptlrpc_request *req, struct ldlm_async_args *aa, int rc) { struct lustre_handle old_hash_key; @@ -2147,7 +2148,7 @@ static int replay_one_lock(struct obd_import *imp, struct ldlm_lock *lock) CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args)); aa = ptlrpc_req_async_args(req); aa->lock_handle = body->lock_handle[0]; - req->rq_interpret_reply = replay_lock_interpret; + req->rq_interpret_reply = (ptlrpc_interpterer_t)replay_lock_interpret; ptlrpcd_add_req(req); RETURN(0); diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index a21992c5dfe50535f072842f8dfc16a4b1b7730e..da91c7e566e7a93161b97870af6a59aa05c18955 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -942,7 +942,8 @@ int mdc_intent_lock(struct obd_export *exp, struct md_op_data *op_data, RETURN(rc); } -static int mdc_intent_getattr_async_interpret(struct ptlrpc_request *req, +static int mdc_intent_getattr_async_interpret(const struct lu_env *env, + struct ptlrpc_request *req, void *unused, int rc) { struct obd_export *exp = req->rq_async_args.pointer_arg[0]; diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index 981b7823dad3b077b5074bca2c2c115b4087cd9f..e5b01f0706ef2ca3f705106f6eff29a7f7aa0279 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -1127,7 +1127,7 @@ static int do_set_info_async(struct obd_export *exp, if (set) { ptlrpc_set_add_req(set, req); - ptlrpc_check_set(set); + ptlrpc_check_set(NULL, set); } else { rc = ptlrpc_queue_wait(req); ptlrpc_req_finished(req); @@ -1735,7 +1735,8 @@ int mdc_get_remote_perm(struct obd_export *exp, const struct lu_fid *fid, RETURN(rc); } -static int mdc_interpret_renew_capa(struct ptlrpc_request *req, void *unused, +static int mdc_interpret_renew_capa(const struct lu_env *env, + struct ptlrpc_request *req, void *unused, int status) { struct obd_capa *oc = req->rq_async_args.pointer_arg[0]; diff --git a/lustre/mds/lproc_mds.c b/lustre/mds/lproc_mds.c index cebd82e44f186268f710ae8e39c1bda647af19ef..138eafac5357420e6e636e0295c7b92253d442cf 100644 --- a/lustre/mds/lproc_mds.c +++ b/lustre/mds/lproc_mds.c @@ -107,7 +107,7 @@ static int lprocfs_mds_wr_evict_client(struct file *file, const char *buffer, CERROR("Failed to evict nid %s from OSTs: rc %d\n", tmpbuf + 4, rc); - ptlrpc_check_set(set); + ptlrpc_check_set(NULL, set); } /* See the comments in function lprocfs_wr_evict_client() diff --git a/lustre/osc/osc_create.c b/lustre/osc/osc_create.c index f3eb6bc1a19e4e70a3942969a6512300ee87a3bd..f6b669ed9ea4002cb2e397741beadf81a3e7439b 100644 --- a/lustre/osc/osc_create.c +++ b/lustre/osc/osc_create.c @@ -61,7 +61,8 @@ #include <obd_class.h> #include "osc_internal.h" -static int osc_interpret_create(struct ptlrpc_request *req, void *data, int rc) +static int osc_interpret_create(const struct lu_env *env, + struct ptlrpc_request *req, void *data, int rc) { struct osc_creator *oscc; struct ost_body *body = NULL; @@ -97,7 +98,7 @@ static int osc_interpret_create(struct ptlrpc_request *req, void *data, int rc) case -EAGAIN: /* valid race delorphan vs create, or somthing after resend */ spin_unlock(&oscc->oscc_lock); - DEBUG_REQ(D_INODE, req, "Got EGAIN - resend \n"); + DEBUG_REQ(D_INODE, req, "Got EAGAIN - resend \n"); break; case -ENOSPC: case -EROFS: diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 9e8bcae2422cf48e51e49e75c0e06565dc0c2a1d..cbebdbb91618457adb9c83aaa9d493df56fcf057 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -68,7 +68,8 @@ static quota_interface_t *quota_interface = NULL; extern quota_interface_t osc_quota_interface; static void osc_release_ppga(struct brw_page **ppga, obd_count count); -static int brw_interpret(struct ptlrpc_request *request, void *data, int rc); +static int brw_interpret(const struct lu_env *env, + struct ptlrpc_request *req, void *data, int rc); int osc_cleanup(struct obd_device *obd); /* Pack OSC object metadata for disk storage (LE byte order). */ @@ -200,7 +201,8 @@ static inline void osc_set_capa_size(struct ptlrpc_request *req, ; } -static int osc_getattr_interpret(struct ptlrpc_request *req, +static int osc_getattr_interpret(const struct lu_env *env, + struct ptlrpc_request *req, struct osc_async_args *aa, int rc) { struct ost_body *body; @@ -250,7 +252,7 @@ static int osc_getattr_async(struct obd_export *exp, struct obd_info *oinfo, osc_pack_req_body(req, oinfo); ptlrpc_request_set_replen(req); - req->rq_interpret_reply = osc_getattr_interpret; + req->rq_interpret_reply = (ptlrpc_interpterer_t)osc_getattr_interpret; CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args)); aa = ptlrpc_req_async_args(req); @@ -345,7 +347,8 @@ out: RETURN(rc); } -static int osc_setattr_interpret(struct ptlrpc_request *req, +static int osc_setattr_interpret(const struct lu_env *env, + struct ptlrpc_request *req, struct osc_async_args *aa, int rc) { struct ost_body *body; @@ -393,12 +396,13 @@ static int osc_setattr_async(struct obd_export *exp, struct obd_info *oinfo, oinfo->oi_oa->o_lcookie = *oti->oti_logcookies; } - /* do mds to ost setattr asynchronouly */ + /* do mds to ost setattr asynchronously */ if (!rqset) { /* Do not wait for response. */ ptlrpcd_add_req(req); } else { - req->rq_interpret_reply = osc_setattr_interpret; + req->rq_interpret_reply = + (ptlrpc_interpterer_t)osc_setattr_interpret; CLASSERT (sizeof(*aa) <= sizeof(req->rq_async_args)); aa = ptlrpc_req_async_args(req); @@ -495,7 +499,8 @@ out: RETURN(rc); } -static int osc_punch_interpret(struct ptlrpc_request *req, +static int osc_punch_interpret(const struct lu_env *env, + struct ptlrpc_request *req, struct osc_async_args *aa, int rc) { struct ost_body *body; @@ -552,7 +557,7 @@ static int osc_punch(struct obd_export *exp, struct obd_info *oinfo, ptlrpc_request_set_replen(req); - req->rq_interpret_reply = osc_punch_interpret; + req->rq_interpret_reply = (ptlrpc_interpterer_t)osc_punch_interpret; CLASSERT (sizeof(*aa) <= sizeof(req->rq_async_args)); aa = ptlrpc_req_async_args(req); aa->aa_oi = oinfo; @@ -639,7 +644,8 @@ static int osc_resource_get_unused(struct obd_export *exp, struct obdo *oa, RETURN(count); } -static int osc_destroy_interpret(struct ptlrpc_request *req, void *data, +static int osc_destroy_interpret(const struct lu_env *env, + struct ptlrpc_request *req, void *data, int rc) { struct client_obd *cli = &req->rq_import->imp_obd->u.cli; @@ -2038,7 +2044,8 @@ static void osc_ap_completion(struct client_obd *cli, struct obdo *oa, EXIT; } -static int brw_interpret(struct ptlrpc_request *req, void *data, int rc) +static int brw_interpret(const struct lu_env *env, + struct ptlrpc_request *req, void *data, int rc) { struct osc_brw_async_args *aa = data; struct client_obd *cli; @@ -3094,7 +3101,8 @@ static int osc_enqueue_fini(struct obd_device *obd, struct ptlrpc_request *req, RETURN(rc); } -static int osc_enqueue_interpret(struct ptlrpc_request *req, +static int osc_enqueue_interpret(const struct lu_env *env, + struct ptlrpc_request *req, struct osc_enqueue_args *aa, int rc) { int intent = aa->oa_oi->oi_flags & LDLM_FL_HAS_INTENT; @@ -3237,7 +3245,8 @@ static int osc_enqueue(struct obd_export *exp, struct obd_info *oinfo, aa->oa_ei = einfo; aa->oa_exp = exp; - req->rq_interpret_reply = osc_enqueue_interpret; + req->rq_interpret_reply = + (ptlrpc_interpterer_t)osc_enqueue_interpret; ptlrpc_set_add_req(rqset, req); } else if (intent) { ptlrpc_req_finished(req); @@ -3374,7 +3383,7 @@ static int osc_statfs_async(struct obd_device *obd, struct obd_info *oinfo, req->rq_no_delay = 1; } - req->rq_interpret_reply = osc_statfs_interpret; + req->rq_interpret_reply = (ptlrpc_interpterer_t)osc_statfs_interpret; CLASSERT (sizeof(*aa) <= sizeof(req->rq_async_args)); aa = ptlrpc_req_async_args(req); aa->aa_oi = oinfo; @@ -3690,7 +3699,8 @@ static int osc_get_info(struct obd_export *exp, obd_count keylen, RETURN(-EINVAL); } -static int osc_setinfo_mds_conn_interpret(struct ptlrpc_request *req, +static int osc_setinfo_mds_conn_interpret(const struct lu_env *env, + struct ptlrpc_request *req, void *aa, int rc) { struct llog_ctxt *ctxt; @@ -3818,7 +3828,7 @@ static int osc_set_info_async(struct obd_export *exp, obd_count keylen, ptlrpc_request_set_replen(req); ptlrpc_set_add_req(set, req); - ptlrpc_check_set(set); + ptlrpc_check_set(NULL, set); RETURN(0); } diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index 5171086f83533261ea8563aa20fa7135a4d7e907..79755d7023d5548a8bfd1cec6c1877c7cc6d72c3 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -723,14 +723,13 @@ void ptlrpc_set_destroy(struct ptlrpc_request_set *set) if (req->rq_phase == RQ_PHASE_NEW) { if (req->rq_interpret_reply != NULL) { - int (*interpreter)(struct ptlrpc_request *, - void *, int) = + ptlrpc_interpterer_t interpreter = req->rq_interpret_reply; /* higher level (i.e. LOV) failed; * let the sub reqs clean up */ req->rq_status = -EBADR; - interpreter(req, &req->rq_async_args, + interpreter(NULL, req, &req->rq_async_args, req->rq_status); } set->set_remaining--; @@ -1126,7 +1125,7 @@ static int ptlrpc_send_new_req(struct ptlrpc_request *req) } /* this sends any unsent RPCs in @set and returns TRUE if all are sent */ -int ptlrpc_check_set(struct ptlrpc_request_set *set) +int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set) { struct list_head *tmp; int force_timer_recalc = 0; @@ -1352,9 +1351,10 @@ int ptlrpc_check_set(struct ptlrpc_request_set *set) ptlrpc_unregister_bulk (req); if (req->rq_interpret_reply != NULL) { - int (*interpreter)(struct ptlrpc_request *,void *,int) = + ptlrpc_interpterer_t interpreter = req->rq_interpret_reply; - req->rq_status = interpreter(req, &req->rq_async_args, + req->rq_status = interpreter(NULL, req, + &req->rq_async_args, req->rq_status); } req->rq_phase = RQ_PHASE_COMPLETE; @@ -1577,7 +1577,8 @@ int ptlrpc_set_wait(struct ptlrpc_request_set *set) lwi = LWI_TIMEOUT_INTR(cfs_time_seconds(timeout ? timeout : 1), ptlrpc_expired_set, ptlrpc_interrupted_set, set); - rc = l_wait_event(set->set_waitq, ptlrpc_check_set(set), &lwi); + rc = l_wait_event(set->set_waitq, + ptlrpc_check_set(NULL, set), &lwi); LASSERT(rc == 0 || rc == -EINTR || rc == -ETIMEDOUT); @@ -2186,7 +2187,8 @@ struct ptlrpc_replay_async_args { int praa_old_status; }; -static int ptlrpc_replay_interpret(struct ptlrpc_request *req, +static int ptlrpc_replay_interpret(const struct lu_env *env, + struct ptlrpc_request *req, void * data, int rc) { struct ptlrpc_replay_async_args *aa = data; diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c index cae29ec64016670bb3c487a39910072a8923f26f..cd1d56bd5bc3459f08e6c3b58d414664ac01290d 100644 --- a/lustre/ptlrpc/import.c +++ b/lustre/ptlrpc/import.c @@ -79,7 +79,8 @@ do { \ } while(0) -static int ptlrpc_connect_interpret(struct ptlrpc_request *request, +static int ptlrpc_connect_interpret(const struct lu_env *env, + struct ptlrpc_request *request, void * data, int rc); int ptlrpc_import_recovery_state_machine(struct obd_import *imp); @@ -656,7 +657,8 @@ static void ptlrpc_maybe_ping_import_soon(struct obd_import *imp) EXIT; } -static int ptlrpc_connect_interpret(struct ptlrpc_request *request, +static int ptlrpc_connect_interpret(const struct lu_env *env, + struct ptlrpc_request *request, void * data, int rc) { struct ptlrpc_connect_async_args *aa = data; @@ -1039,7 +1041,8 @@ out: RETURN(rc); } -static int completed_replay_interpret(struct ptlrpc_request *req, +static int completed_replay_interpret(const struct lu_env *env, + struct ptlrpc_request *req, void * data, int rc) { ENTRY; diff --git a/lustre/ptlrpc/pinger.c b/lustre/ptlrpc/pinger.c index 9a51022f4028eac1965eaef8ce39df3220d55b1e..0da3caa5ab33be5b5d62cdb73a84e917d7fef123 100644 --- a/lustre/ptlrpc/pinger.c +++ b/lustre/ptlrpc/pinger.c @@ -642,7 +642,7 @@ static int pinger_check_rpcs(void *arg) } do_check_set: - rc = ptlrpc_check_set(set); + rc = ptlrpc_check_set(NULL, set); /* not finished, and we are not expired, simply return */ if (!rc && cfs_time_before(curtime, cfs_time_add(pd->pd_this_ping, diff --git a/lustre/ptlrpc/ptlrpcd.c b/lustre/ptlrpc/ptlrpcd.c index b87dde68aa31a30cb77d42a7f7a3f822c7db7c85..934e1e7c648871a4c2758ebb434c82d3d5941035 100644 --- a/lustre/ptlrpc/ptlrpcd.c +++ b/lustre/ptlrpc/ptlrpcd.c @@ -84,8 +84,7 @@ void ptlrpcd_add_req(struct ptlrpc_request *req) rc = ptlrpc_set_add_new_req(pc, req); if (rc) { - int (*interpreter)(struct ptlrpc_request *, - void *, int); + ptlrpc_interpterer_t interpreter; interpreter = req->rq_interpret_reply; @@ -97,14 +96,14 @@ void ptlrpcd_add_req(struct ptlrpc_request *req) * resources. */ req->rq_status = -EBADR; - interpreter(req, &req->rq_async_args, + interpreter(NULL, req, &req->rq_async_args, req->rq_status); req->rq_set = NULL; ptlrpc_req_finished(req); } } -static int ptlrpcd_check(struct ptlrpcd_ctl *pc) +static int ptlrpcd_check(const struct lu_env *env, struct ptlrpcd_ctl *pc) { struct list_head *tmp, *pos; struct ptlrpc_request *req; @@ -127,7 +126,7 @@ static int ptlrpcd_check(struct ptlrpcd_ctl *pc) spin_unlock(&pc->pc_set->set_new_req_lock); if (pc->pc_set->set_remaining) { - rc = rc | ptlrpc_check_set(pc->pc_set); + rc = rc | ptlrpc_check_set(env, pc->pc_set); /* * XXX: our set never completes, so we prune the completed @@ -189,7 +188,10 @@ static int ptlrpcd(void *arg) timeout = cfs_time_seconds(ptlrpc_set_next_timeout(pc->pc_set)); lwi = LWI_TIMEOUT(timeout, ptlrpc_expired_set, pc->pc_set); - l_wait_event(pc->pc_set->set_waitq, ptlrpcd_check(pc), &lwi); + lu_context_enter(&pc->pc_env.le_ctx); + l_wait_event(pc->pc_set->set_waitq, + ptlrpcd_check(&pc->pc_env, pc), &lwi); + lu_context_exit(&pc->pc_env.le_ctx); /* * Abort inflight rpcs for forced stop case. @@ -214,7 +216,7 @@ out: return 0; } -#else +#else /* !__KERNEL__ */ int ptlrpcd_check_async_rpcs(void *arg) { @@ -227,14 +229,16 @@ int ptlrpcd_check_async_rpcs(void *arg) pc->pc_recurred++; if (pc->pc_recurred == 1) { - rc = ptlrpcd_check(pc); + lu_context_enter(&pc->pc_env.le_ctx); + rc = ptlrpcd_check(&pc->pc_env, pc); + lu_context_exit(&pc->pc_env.le_ctx); if (!rc) ptlrpc_expired_set(pc->pc_set); /* * XXX: send replay requests. */ if (pc == &ptlrpcd_recovery_pc) - rc = ptlrpcd_check(pc); + rc = ptlrpcd_check(&pc->pc_env, pc); } pc->pc_recurred--; @@ -253,7 +257,7 @@ int ptlrpcd_idle(void *arg) int ptlrpcd_start(char *name, struct ptlrpcd_ctl *pc) { - int rc = 0; + int rc; ENTRY; /* @@ -269,14 +273,24 @@ int ptlrpcd_start(char *name, struct ptlrpcd_ctl *pc) init_completion(&pc->pc_finishing); spin_lock_init(&pc->pc_lock); snprintf (pc->pc_name, sizeof (pc->pc_name), name); - pc->pc_set = ptlrpc_prep_set(); if (pc->pc_set == NULL) GOTO(out, rc = -ENOMEM); + /* + * So far only "client" ptlrpcd uses an environment. In the future, + * ptlrpcd thread (or a thread-set) has to be given an argument, + * describing its "scope". + */ + rc = lu_context_init(&pc->pc_env.le_ctx, LCT_CL_THREAD|LCT_REMEMBER); + if (rc != 0) { + ptlrpc_set_destroy(pc->pc_set); + GOTO(out, rc); + } #ifdef __KERNEL__ rc = cfs_kernel_thread(ptlrpcd, pc, 0); if (rc < 0) { + lu_context_fini(&pc->pc_env.le_ctx); ptlrpc_set_destroy(pc->pc_set); GOTO(out, rc); } @@ -313,6 +327,7 @@ void ptlrpcd_stop(struct ptlrpcd_ctl *pc, int force) liblustre_deregister_wait_callback(pc->pc_wait_callback); liblustre_deregister_idle_callback(pc->pc_idle_callback); #endif + lu_context_fini(&pc->pc_env.le_ctx); ptlrpc_set_destroy(pc->pc_set); } diff --git a/lustre/ptlrpc/recov_thread.c b/lustre/ptlrpc/recov_thread.c index 60e8a130879d6694ab8c5c40aeda1001d6f1f082..716866c47096e0916e4ebe4b222278d305b74c46 100644 --- a/lustre/ptlrpc/recov_thread.c +++ b/lustre/ptlrpc/recov_thread.c @@ -149,7 +149,8 @@ static void llcd_print(struct llog_canceld_ctxt *llcd, * in cleanup time when all inflight rpcs aborted. */ static int -llcd_interpret(struct ptlrpc_request *req, void *noused, int rc) +llcd_interpret(const struct lu_env *env, + struct ptlrpc_request *req, void *noused, int rc) { struct llog_canceld_ctxt *llcd = req->rq_async_args.pointer_arg[0]; CDEBUG(D_RPCTRACE, "Sent llcd %p (%d)\n", llcd, rc); @@ -231,7 +232,7 @@ 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 = llcd_interpret; + req->rq_interpret_reply = (ptlrpc_interpterer_t)llcd_interpret; req->rq_async_args.pointer_arg[0] = llcd; rc = ptlrpc_set_add_new_req(&lcm->lcm_pc, req); if (rc) { diff --git a/lustre/quota/quota_context.c b/lustre/quota/quota_context.c index 0e8d63f31f718405670131744207037b82c39974..2b7635f58fb68bd69f71618690fe10bc43fcedca 100644 --- a/lustre/quota/quota_context.c +++ b/lustre/quota/quota_context.c @@ -559,7 +559,8 @@ struct dqacq_async_args { struct lustre_qunit *aa_qunit; }; -static int dqacq_interpret(struct ptlrpc_request *req, void *data, int rc) +static int dqacq_interpret(const struct lu_env *env, + struct ptlrpc_request *req, void *data, int rc) { struct dqacq_async_args *aa = (struct dqacq_async_args *)data; struct lustre_quota_ctxt *qctxt = aa->aa_ctxt;