* GPL HEADER END
*/
/*
- * Copyright (c) 2012 Intel, Inc.
+ * Copyright (c) 2012, Intel Corporation.
* Use is subject to license terms.
*
* Author: Johann Lombardi <johann.lombardi@intel.com>
struct obd_uuid *uuid;
struct lquota_lvb *lvb;
struct ldlm_resource *res = (*lockp)->l_resource;
- int rc;
+ int rc, lvb_len;
ENTRY;
req_capsule_extend(&req->rq_pill, &RQF_LDLM_INTENT_QUOTA);
+ req_capsule_set_size(&req->rq_pill, &RMF_DLM_LVB, RCL_SERVER,
+ ldlm_lvbo_size(*lockp));
/* extract quota body and intent opc */
it = req_capsule_client_get(&req->rq_pill, &RMF_LDLM_INTENT);
}
/* on success, pack lvb in reply */
- req_capsule_set_size(&req->rq_pill, &RMF_DLM_LVB, RCL_SERVER,
- ldlm_lvbo_size(*lockp));
lvb = req_capsule_server_get(&req->rq_pill, &RMF_DLM_LVB);
- ldlm_lvbo_fill(*lockp, lvb, ldlm_lvbo_size(*lockp));
+ lvb_len = ldlm_lvbo_size(*lockp);
+ lvb_len = ldlm_lvbo_fill(*lockp, lvb, lvb_len);
+ req_capsule_shrink(&req->rq_pill, &RMF_DLM_LVB, lvb_len, RCL_SERVER);
EXIT;
out:
return rc;
/* no need to update lvb for global quota locks */
RETURN(0);
- lvb = req_capsule_server_get(&req->rq_pill, &RMF_DLM_LVB);
+ lvb = req_capsule_server_swab_get(&req->rq_pill, &RMF_DLM_LVB,
+ lustre_swab_lquota_lvb);
if (lvb == NULL) {
CERROR("%s: failed to extract lvb from request\n",
qmt->qmt_svname);
qti->qti_gl_desc.lquota_desc.gl_flags = 0;
qti->qti_gl_desc.lquota_desc.gl_hardlimit = lqe->lqe_hardlimit;
qti->qti_gl_desc.lquota_desc.gl_softlimit = lqe->lqe_softlimit;
+ qti->qti_gl_desc.lquota_desc.gl_time = lqe->lqe_gracetime;
qti->qti_gl_desc.lquota_desc.gl_ver = ver;
/* look up ldlm resource associated with global index */