X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fquota%2Fqsd_request.c;h=d1cd51579efa76548790efbe811cf6ed3e464753;hb=654586b8f498550056d4a5949768a70736f07677;hp=2db043312147e28328830f9ace0a9490f184ec05;hpb=1b2547843817b4b7adbeb87ea9b070d9cac35c90;p=fs%2Flustre-release.git diff --git a/lustre/quota/qsd_request.c b/lustre/quota/qsd_request.c index 2db0433..d1cd515 100644 --- a/lustre/quota/qsd_request.c +++ b/lustre/quota/qsd_request.c @@ -21,17 +21,13 @@ * GPL HEADER END */ /* - * Copyright (c) 2012, 2013, Intel Corporation. + * Copyright (c) 2012, 2015, Intel Corporation. * Use is subject to license terms. * * Author: Johann Lombardi * Author: Niu Yawei */ -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif - #define DEBUG_SUBSYSTEM S_LQUOTA #include @@ -117,6 +113,7 @@ int qsd_send_dqacq(const struct lu_env *env, struct obd_export *exp, GOTO(out, rc); } + req->rq_request_portal = MDS_READPAGE_PORTAL; req_qbody = req_capsule_client_get(&req->rq_pill, &RMF_QUOTA_BODY); *req_qbody = *qbody; @@ -136,7 +133,7 @@ int qsd_send_dqacq(const struct lu_env *env, struct obd_export *exp, ptlrpc_req_finished(req); } else { req->rq_interpret_reply = qsd_dqacq_interpret; - ptlrpcd_add_req(req, PDL_POLICY_LOCAL, -1); + ptlrpcd_add_req(req); } RETURN(rc); @@ -235,6 +232,7 @@ int qsd_intent_lock(const struct lu_env *env, struct obd_export *exp, ptlrpc_request_free(req); GOTO(out, rc); } + req->rq_request_portal = MDS_READPAGE_PORTAL; lit = req_capsule_client_get(&req->rq_pill, &RMF_LDLM_INTENT); lit->opc = (__u64)it_op; @@ -268,7 +266,7 @@ int qsd_intent_lock(const struct lu_env *env, struct obd_export *exp, qti->qti_einfo.ei_cbdata = arg; break; default: - LASSERTF(0, "invalid it_op %d", it_op); + LASSERTF(0, "invalid it_op %d\n", it_op); } /* build lock enqueue request */ @@ -291,7 +289,7 @@ int qsd_intent_lock(const struct lu_env *env, struct obd_export *exp, lock = ldlm_handle2lock(&qti->qti_lockh); if (lock == NULL) { ptlrpc_req_finished(req); - GOTO(out, -ENOLCK); + GOTO(out, rc = -ENOLCK); } lu_ref_add(&qqi->qqi_reference, "glb_lock", lock); LDLM_LOCK_PUT(lock); @@ -327,7 +325,7 @@ int qsd_intent_lock(const struct lu_env *env, struct obd_export *exp, } else { /* queue lock request and return */ req->rq_interpret_reply = qsd_intent_interpret; - ptlrpcd_add_req(req, PDL_POLICY_LOCAL, -1); + ptlrpcd_add_req(req); } RETURN(rc); @@ -376,8 +374,10 @@ int qsd_fetch_index(const struct lu_env *env, struct obd_export *exp, ptlrpc_at_set_req_timeout(req); /* allocate bulk descriptor */ - desc = ptlrpc_prep_bulk_imp(req, npages, 1, BULK_PUT_SINK, - MDS_BULK_PORTAL); + desc = ptlrpc_prep_bulk_imp(req, npages, 1, + PTLRPC_BULK_PUT_SINK | PTLRPC_BULK_BUF_KIOV, + MDS_BULK_PORTAL, + &ptlrpc_bulk_kiov_pin_ops); if (desc == NULL) { ptlrpc_request_free(req); RETURN(-ENOMEM); @@ -385,7 +385,8 @@ int qsd_fetch_index(const struct lu_env *env, struct obd_export *exp, /* req now owns desc and will free it when it gets freed */ for (i = 0; i < npages; i++) - ptlrpc_prep_bulk_page_pin(desc, pages[i], 0, PAGE_CACHE_SIZE); + desc->bd_frag_ops->add_kiov_frag(desc, pages[i], 0, + PAGE_CACHE_SIZE); /* pack index information in request */ req_ii = req_capsule_client_get(&req->rq_pill, &RMF_IDX_INFO);