Whamcloud - gitweb
LU-2361 quota: allow upgraded fs to start w/o spc accounting
[fs/lustre-release.git] / lustre / quota / qsd_config.c
index 489034b..32b785f 100644 (file)
@@ -21,7 +21,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012 Intel, Inc.
+ * Copyright (c) 2012, Intel Corporation.
  * Use is subject to license terms.
  *
  * Author: Johann Lombardi <johann.lombardi@intel.com>
@@ -191,6 +191,16 @@ 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++) {
                                qqi = qsd->qsd_type_array[type];