case QUOTA_DQREL:
/* The usage in administrative file might be incorrect before
* recovery done */
- if (*usage - qdata->qd_count < 0)
+ if (*usage < qdata->qd_count)
*usage = 0;
else
*usage -= qdata->qd_count;
EXIT;
out:
+ CDEBUG(D_QUOTA, "%s: quotaoff type:flags:rc %u:%lu:%d\n",
+ obd->obd_name, oqctl->qc_type, qctxt->lqc_flags, rc);
cfs_up_write(&mds->mds_qonoff_sem);
pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
return rc ? : (rc1 ? : rc2);
oqaq->qaq_bunit_sz =
QUSG(oqaq->qaq_bunit_sz * cqs_factor, 1)
<< QUOTABLOCK_BITS;
+ if (oqaq->qaq_bunit_sz >= qctxt->lqc_bunit_sz)
+ break;
b_limitation = oqaq->qaq_bunit_sz * (ost_num + 1) *
shrink_qunit_limit;
}
while (ilimit > dquot->dq_dqb.dqb_curinodes
+ 2 * i_limitation) {
oqaq->qaq_iunit_sz = oqaq->qaq_iunit_sz * cqs_factor;
+ if (oqaq->qaq_iunit_sz >= qctxt->lqc_iunit_sz)
+ break;
i_limitation = oqaq->qaq_iunit_sz * mdt_num *
shrink_qunit_limit;
}
data.obd = obd;
cfs_init_completion(&data.comp);
- rc = cfs_kernel_thread(qmaster_recovery_main, &data,
- CLONE_VM|CLONE_FILES);
+ rc = cfs_create_thread(qmaster_recovery_main, &data,
+ CFS_DAEMON_FLAGS);
if (rc < 0)
CERROR("%s: cannot start quota recovery thread: rc %d\n",
obd->obd_name, rc);