* 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>
* Author: Niu Yawei <yawei.niu@intel.com>
*/
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
#define DEBUG_SUBSYSTEM S_LQUOTA
#include "qsd_internal.h"
struct quota_body *reqbody,
struct quota_body *repbody,
struct lustre_handle *lockh,
- union ldlm_wire_lvb *lvb,
+ struct lquota_lvb *lvb,
void *arg, int ret)
{
struct lquota_entry *lqe = (struct lquota_entry *)arg;
/* extract information from lvb */
if (ret == 0 && lvb != 0) {
- if (lvb->l_lquota.lvb_id_qunit != 0)
- qsd_set_qunit(lqe, lvb->l_lquota.lvb_id_qunit);
- if (lvb->l_lquota.lvb_flags & LQUOTA_FL_EDQUOT)
+ if (lvb->lvb_id_qunit != 0)
+ qsd_set_qunit(lqe, lvb->lvb_id_qunit);
+ if (lvb->lvb_flags & LQUOTA_FL_EDQUOT)
lqe->lqe_edquot = true;
else
lqe->lqe_edquot = false;
/* check whether we already own a valid lock for this ID */
rc = qsd_id_lock_match(&qti->qti_lockh, &qbody->qb_lockh);
if (rc) {
- union ldlm_wire_lvb *lvb;
+ struct lquota_lvb *lvb;
OBD_ALLOC_PTR(lvb);
if (lvb == NULL) {
/* ignore quota enforcement request when:
* - quota isn't enforced for this quota type
- * or - the user/group is root */
- if (!qsd_type_enabled(qsd, qi->lqi_type) || qi->lqi_id.qid_uid == 0)
+ * or - the user/group is root
+ * or - quota accounting isn't enabled */
+ if (!qsd_type_enabled(qsd, qi->lqi_type) || qi->lqi_id.qid_uid == 0 ||
+ qsd->qsd_acct_failed)
RETURN(0);
LASSERTF(trans->lqt_id_cnt <= QUOTA_MAX_TRANSIDS, "id_cnt=%d",
qsd_req_completion, qqi, &qti->qti_lockh,
lqe);
} else {
- union ldlm_wire_lvb *lvb;
+ struct lquota_lvb *lvb;
OBD_ALLOC_PTR(lvb);
if (lvb == NULL)