Whamcloud - gitweb
LU-9183 ptlrpc: handle changes in struct group_info
[fs/lustre-release.git] / lustre / quota / qsd_config.c
index feddff4..08cbeb6 100644 (file)
@@ -21,7 +21,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012, 2013, Intel Corporation.
+ * Copyright (c) 2012, 2014, Intel Corporation.
  * Use is subject to license terms.
  *
  * Author: Johann Lombardi <johann.lombardi@intel.com>
@@ -159,6 +159,8 @@ int qsd_process_config(struct lustre_cfg *lcfg)
                enabled |= 1 << USRQUOTA;
        if (strchr(valstr, 'g'))
                enabled |= 1 << GRPQUOTA;
+       if (strchr(valstr, 'p'))
+               enabled |= 1 << PRJQUOTA;
 
        mutex_lock(&qfs->qfs_mutex);
        if (qfs->qfs_enabled[pool - LQUOTA_FIRST_RES] == enabled)
@@ -187,19 +189,19 @@ int qsd_process_config(struct lustre_cfg *lcfg)
                        read_unlock(&qsd->qsd_lock);
                        if (skip)
                                continue;
-                       if (qsd->qsd_acct_failed) {
-                               LCONSOLE_ERROR("%s: can't enable quota "
-                                              "enforcement since space "
-                                              "accounting isn't functional. "
-                                              "Please run tunefs.lustre "
-                                              "--quota on an unmounted "
-                                              "filesystem if not done already"
-                                              "\n", qsd->qsd_svname);
-                               continue;
-                       }
 
-                       for (type = USRQUOTA; type < MAXQUOTAS; type++) {
+                       for (type = USRQUOTA; type < LL_MAXQUOTAS; type++) {
                                qqi = qsd->qsd_type_array[type];
+                               if (qqi->qqi_acct_failed) {
+                                       LCONSOLE_ERROR("%s: can't enable quota "
+                                                      "enforcement since space "
+                                                      "accounting isn't functional. "
+                                                      "Please run tunefs.lustre "
+                                                      "--quota on an unmounted "
+                                                      "filesystem if not done already"
+                                                      "\n", qsd->qsd_svname);
+                                       continue;
+                               }
                                qsd_start_reint_thread(qqi);
                        }
                }