Whamcloud - gitweb
b=21174 allow quotacheck over OSTs with sparse indices
authorAndrew Perepechko <Andrew.Perepechko@sun.com>
Mon, 16 Aug 2010 12:00:02 +0000 (16:00 +0400)
committerJohann Lombardi <johann.lombardi@oracle.com>
Fri, 20 Aug 2010 11:16:44 +0000 (13:16 +0200)
i=Johann Lombardi
i=ZhiYong Tian

lustre/quota/quota_check.c

index 4729d6b..f384edd 100644 (file)
@@ -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;