Whamcloud - gitweb
b=21174 fix quotacheck with non-consecutive OST indices
authorAndrew Perepechko <Andrew.Perepechko@sun.com>
Mon, 13 Sep 2010 18:04:58 +0000 (22:04 +0400)
committerMikhail Pershin <tappro@sun.com>
Tue, 21 Sep 2010 13:11:37 +0000 (17:11 +0400)
i=Johann Lombardi
i=ZhiYong Tian
i=Elena Gryaznova

a=31085
a=31094

lustre/quota/quota_check.c
lustre/tests/conf-sanity.sh

index c6e8daa..6732d06 100644 (file)
@@ -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++) {
         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;
                         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;
 
         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;
                 err = obd_quotacheck(lov->lov_tgts[i]->ltd_exp, oqctl);
                 if (err && !rc)
                         rc = err;
index 7cd3765..04d7d2d 100644 (file)
@@ -2450,6 +2450,7 @@ test_56() {
        mount_client $MOUNT || error "Unable to mount client"
        echo ok
        $LFS osts
        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
 }
        stopall
        reformat
 }