From: Niu Yawei Date: Thu, 30 May 2013 03:46:28 +0000 (-0400) Subject: LU-3415 quota: not enforce quota when accounting disabled X-Git-Tag: 2.4.51~33 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=c42672d425d15a89257d6ec7f2bae0f547f4c279;ds=sidebyside LU-3415 quota: not enforce quota when accounting disabled When quota accounting isn't enabled, don't try to enforce quota. Signed-off-by: Niu Yawei Change-Id: I9a74b7bfe6b2981adf501042efb6867a77ee4044 Reviewed-on: http://review.whamcloud.com/6492 Tested-by: Hudson Reviewed-by: Fan Yong Reviewed-by: Andreas Dilger Reviewed-by: Johann Lombardi Tested-by: Maloo --- diff --git a/lustre/quota/qsd_handler.c b/lustre/quota/qsd_handler.c index 805be89..be212cf 100644 --- a/lustre/quota/qsd_handler.c +++ b/lustre/quota/qsd_handler.c @@ -849,8 +849,10 @@ int qsd_op_begin(const struct lu_env *env, struct qsd_instance *qsd, /* 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",