From 4931dec58f510b719d82749c29b75f3f1dad5493 Mon Sep 17 00:00:00 2001 From: Andrew Perepechko Date: Mon, 16 Aug 2010 16:00:02 +0400 Subject: [PATCH] b=21174 allow quotacheck over OSTs with sparse indices i=Johann Lombardi i=ZhiYong Tian --- lustre/quota/quota_check.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lustre/quota/quota_check.c b/lustre/quota/quota_check.c index 4729d6b..f384edd 100644 --- a/lustre/quota/quota_check.c +++ b/lustre/quota/quota_check.c @@ -249,7 +249,10 @@ int lov_quota_check(struct obd_export *exp, struct obd_quotactl *oqctl) obd_getref(obd); for (i = 0; i < lov->desc.ld_tgt_count; i++) { - if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active) { + if (!lov->lov_tgts[i]) + continue; + + if (!lov->lov_tgts[i]->ltd_active) { CERROR("lov idx %d inactive\n", i); rc = -EIO; goto out; @@ -259,6 +262,9 @@ int lov_quota_check(struct obd_export *exp, struct obd_quotactl *oqctl) for (i = 0; i < lov->desc.ld_tgt_count; i++) { int err; + if (!lov->lov_tgts[i]) + continue; + err = obd_quotacheck(lov->lov_tgts[i]->ltd_exp, oqctl); if (err && !rc) rc = err; -- 1.8.3.1