From: Andrew Perepechko Date: Mon, 13 Sep 2010 18:04:58 +0000 (+0400) Subject: b=21174 fix quotacheck with non-consecutive OST indices X-Git-Tag: 2.0.53.0~56 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=fb51847c046516f07f3af75226a758da25845bcc;hp=a7186f3ac0d077247f9f28a97afdb059d13cc412 b=21174 fix quotacheck with non-consecutive OST indices i=Johann Lombardi i=ZhiYong Tian i=Elena Gryaznova a=31085 a=31094 --- diff --git a/lustre/quota/quota_check.c b/lustre/quota/quota_check.c index c6e8daa..6732d06 100644 --- a/lustre/quota/quota_check.c +++ b/lustre/quota/quota_check.c @@ -301,7 +301,10 @@ int lov_quota_check(struct obd_device *unused, struct obd_export *exp, 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; @@ -311,6 +314,9 @@ int lov_quota_check(struct obd_device *unused, struct obd_export *exp, 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; diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 7cd3765..04d7d2d 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -2450,6 +2450,7 @@ test_56() { mount_client $MOUNT || error "Unable to mount client" echo ok $LFS osts + [ -n "$ENABLE_QUOTA" ] && { $LFS quotacheck -ug $MOUNT || error "quotacheck has failed" ; } stopall reformat }