}
if (oqctl->qc_cmd == Q_FINVALIDATE &&
(obt->obt_qctxt.lqc_flags & UGQUOTA2LQC(oqctl->qc_type))) {
+ atomic_inc(&obt->obt_quotachecking);
rc = -EBUSY;
break;
}
* dqacq/dqrel done then return the correct limits to master */
if (oqctl->qc_stat == QUOTA_RECOVERING)
qctxt_wait_pending_dqacq(&obd->u.obt.obt_qctxt,
- oqctl->qc_id, oqctl->qc_type,
+ oqctl->qc_id, oqctl->qc_type,
1);
push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
{
struct obd_device *obd = class_exp2obd(exp);
struct lov_obd *lov = &obd->u.lov;
+ struct lov_tgt_desc *tgt;
__u64 curspace = 0;
__u64 bhardlimit = 0;
int i, rc = 0;
RETURN(-EFAULT);
}
+ /* for lov tgt */
+ obd_getref(obd);
for (i = 0; i < lov->desc.ld_tgt_count; i++) {
int err;
- if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active) {
+ tgt = lov->lov_tgts[i];
+ if (!tgt || !tgt->ltd_active || tgt->ltd_reap) {
if (oqctl->qc_cmd == Q_GETOQUOTA) {
CERROR("ost %d is inactive\n", i);
rc = -EIO;
continue;
}
- err = obd_quotactl(lov->lov_tgts[i]->ltd_exp, oqctl);
+ err = obd_quotactl(tgt->ltd_exp, oqctl);
if (err) {
- if (lov->lov_tgts[i]->ltd_active && !rc)
+ if (tgt->ltd_active && !rc)
rc = err;
continue;
}
bhardlimit += oqctl->qc_dqblk.dqb_bhardlimit;
}
}
+ obd_putref(obd);
if (oqctl->qc_cmd == Q_GETOQUOTA) {
oqctl->qc_dqblk.dqb_curspace = curspace;