Whamcloud - gitweb
LU-3409 llite: silence lockdep warning in ll_md_blocking_ast
[fs/lustre-release.git] / lustre / quota / lproc_quota.c
index 9c65526..727398c 100644 (file)
@@ -21,7 +21,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012 Intel, Inc.
+ * Copyright (c) 2011, 2013, Intel Corporation.
  * Use is subject to license terms.
  *
  * Author: Johann Lombardi <johann.lombardi@intel.com>
@@ -201,6 +201,9 @@ static int lprocfs_quota_seq_show(struct seq_file *p, void *v)
 
                        seq_printf(p, "global_pool%d_%s_%s\n", poolid,
                                   RES_NAME(rtype), QTYPE_NAME(qtype));
+               } else if (fid_seq(fid) == FID_SEQ_LOCAL_NAME) {
+                       /* global index copy object */
+                       seq_printf(p, "global_index_copy:\n");
                } else {
                        return -ENOTSUPP;
                }
@@ -231,7 +234,8 @@ static int lprocfs_quota_seq_show(struct seq_file *p, void *v)
                           "u }\n", "usage:",
                           ((struct lquota_acct_rec *)rec)->ispace,
                           toqb(((struct lquota_acct_rec *)rec)->bspace));
-       else if (fid_seq(fid) == FID_SEQ_QUOTA_GLB)
+       else if (fid_seq(fid) == FID_SEQ_QUOTA_GLB ||
+                fid_seq(fid) == FID_SEQ_LOCAL_NAME)
                seq_printf(p, "  %-8s { hard: %20"LPF64"u, soft: %20"LPF64
                           "u, granted: %20"LPF64"u, time: %20"LPF64"u }\n",
                           "limits:",
@@ -268,8 +272,13 @@ static int lprocfs_quota_seq_open(struct inode *inode, struct file *file)
        /* Initialize the common environment to be used in the seq operations */
        rc = lu_env_init(&lqp->lqp_env, LCT_LOCAL);
        if (rc) {
+               char *obd_name = "quota";
+
+               if (lqp->lqp_obj != NULL)
+                       obd_name = lqp->lqp_obj->do_lu.lo_dev->ld_obd->obd_name;
+
                CERROR("%s: error initializing procfs quota env: rc = %d\n",
-                      lqp->lqp_obj->do_lu.lo_dev->ld_obd->obd_name, rc);
+                      obd_name, rc);
                goto out_lqp;
        }