struct lov_obd *lov = &obd->u.lov;
struct lov_tgt_desc *tgt;
struct lov_pool_desc *pool = NULL;
+ struct list_head *lst = NULL;
__u64 curspace = 0;
__u64 bhardlimit = 0;
int i, rc = 0;
ENTRY;
if (oqctl->qc_cmd != Q_GETOQUOTA &&
oqctl->qc_cmd != LUSTRE_Q_SETQUOTA &&
- oqctl->qc_cmd != LUSTRE_Q_GETQUOTAPOOL) {
+ oqctl->qc_cmd != LUSTRE_Q_GETQUOTAPOOL &&
+ oqctl->qc_cmd != LUSTRE_Q_ITEROQUOTA) {
rc = -EFAULT;
CERROR("%s: bad quota opc %x for lov obd: rc = %d\n",
obd->obd_name, oqctl->qc_cmd, rc);
oqctl->qc_cmd = Q_GETOQUOTA;
}
+ if (oqctl->qc_cmd == LUSTRE_Q_ITEROQUOTA)
+ lst = (struct list_head *)oqctl->qc_iter_list;
+
/* for lov tgt */
lov_tgts_getref(obd);
for (i = 0; i < lov->desc.ld_tgt_count; i++) {
continue;
}
- err = obd_quotactl(tgt->ltd_exp, oqctl);
+ if (oqctl->qc_cmd == LUSTRE_Q_ITEROQUOTA)
+ err = obd_quota_iter(tgt->ltd_exp, oqctl, lst);
+ else
+ err = obd_quotactl(tgt->ltd_exp, oqctl);
+
if (err) {
if (tgt->ltd_active && !rc)
rc = err;
oqctl->qc_dqblk.dqb_curspace = curspace;
oqctl->qc_dqblk.dqb_bhardlimit = bhardlimit;
}
+
RETURN(rc);
}