- rc = fsfilt_quotactl(obd, obd->u.obt.obt_sb, oqctl);
- if (!rc)
- obt->obt_qctxt.lqc_flags |= UGQUOTA2LQC(oqctl->qc_type);
- else
- GOTO(out, rc);
+ rc1 = fsfilt_quotactl(obd, obd->u.obt.obt_sb, oqctl);
+ if (!rc1) {
+ qctxt->lqc_flags |= UGQUOTA2LQC(oqctl->qc_type);
+ /* when quotaon, create lqs for every quota uid/gid b=18574 */
+ build_lqs(obd);
+ } else if (rc1 == -EBUSY && quota_is_on(qctxt, oqctl)) {
+ CWARN("mds local quota[%d] is on already\n", oqctl->qc_type);
+ rc1 = -EALREADY;
+ } else {
+ if (rc2 != -EALREADY) {
+ CWARN("mds local quota[%d] is failed to be on for %d\n",
+ oqctl->qc_type, rc1);
+ oqctl->qc_cmd = Q_QUOTAOFF;
+ mds_admin_quota_off(obd, oqctl);
+ oqctl->qc_cmd = Q_QUOTAON;
+ }
+ GOTO(out, rc1);
+ }