Whamcloud - gitweb
LU-8127 lfsck: compile XATTR_NAME_LFSCK_NAMESPACE_OLD
[fs/lustre-release.git] / lustre / quota / qmt_pool.c
index 2189342..78e1acb 100644 (file)
@@ -21,7 +21,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2013, Intel Corporation.
  * Use is subject to license terms.
  *
  * Author: Johann Lombardi <johann.lombardi@intel.com>
@@ -86,7 +86,8 @@ static inline void qpi_putref_locked(struct qmt_pool_info *pool)
  * Hash functions for qmt_pool_info management
  */
 
-static unsigned qpi_hash_hash(cfs_hash_t *hs, const void *key, unsigned mask)
+static unsigned
+qpi_hash_hash(struct cfs_hash *hs, const void *key, unsigned mask)
 {
        return cfs_hash_u32_hash(*((__u32 *)key), mask);
 }
@@ -110,27 +111,27 @@ static void *qpi_hash_object(struct hlist_node *hnode)
        return hlist_entry(hnode, struct qmt_pool_info, qpi_hash);
 }
 
-static void qpi_hash_get(cfs_hash_t *hs, struct hlist_node *hnode)
+static void qpi_hash_get(struct cfs_hash *hs, struct hlist_node *hnode)
 {
        struct qmt_pool_info *pool;
        pool = hlist_entry(hnode, struct qmt_pool_info, qpi_hash);
        qpi_getref(pool);
 }
 
-static void qpi_hash_put_locked(cfs_hash_t *hs, struct hlist_node *hnode)
+static void qpi_hash_put_locked(struct cfs_hash *hs, struct hlist_node *hnode)
 {
        struct qmt_pool_info *pool;
        pool = hlist_entry(hnode, struct qmt_pool_info, qpi_hash);
        qpi_putref_locked(pool);
 }
 
-static void qpi_hash_exit(cfs_hash_t *hs, struct hlist_node *hnode)
+static void qpi_hash_exit(struct cfs_hash *hs, struct hlist_node *hnode)
 {
        CERROR("Should not have any item left!\n");
 }
 
 /* vector of hash operations */
-static cfs_hash_ops_t qpi_hash_ops = {
+static struct cfs_hash_ops qpi_hash_ops = {
        .hs_hash        = qpi_hash_hash,
        .hs_key         = qpi_hash_key,
        .hs_keycmp      = qpi_hash_keycmp,
@@ -378,7 +379,7 @@ void qmt_pool_fini(const struct lu_env *env, struct qmt_device *qmt)
  * pool which are instantiated in this function.
  *
  * \param env - is the environment passed by the caller
- * \param qmt - is the quota master target for which we have to initializa the
+ * \param qmt - is the quota master target for which we have to initialize the
  *              pool configuration
  *
  * \retval - 0 on success, appropriate error on failure
@@ -437,7 +438,7 @@ static int qmt_slv_cnt(const struct lu_env *env, struct lu_fid *glb_fid,
  * Set up on-disk index files associated with each pool.
  *
  * \param env - is the environment passed by the caller
- * \param qmt - is the quota master target for which we have to initializa the
+ * \param qmt - is the quota master target for which we have to initialize the
  *              pool configuration
  * \param qmt_root - is the on-disk directory created for the QMT.
  *
@@ -565,7 +566,7 @@ int qmt_pool_prepare(const struct lu_env *env, struct qmt_device *qmt,
                        if (IS_ERR(lqe))
                                RETURN(PTR_ERR(lqe));
                        pool->qpi_grace_lqe[qtype] = lqe;
-#ifdef LPROCFS
+#ifdef CONFIG_PROC_FS
                        /* add procfs file to dump the global index, mostly for
                         * debugging purpose */
                        sprintf(qti->qti_buf, "glb-%s", QTYPE_NAME(qtype));
@@ -649,7 +650,7 @@ out:
  * Look-up a lquota_entry in the pool hash and allocate it if not found.
  *
  * \param env - is the environment passed by the caller
- * \param qmt - is the quota master target for which we have to initializa the
+ * \param qmt - is the quota master target for which we have to initialize the
  *              pool configuration
  * \param pool_id   - is the 16-bit identifier of the pool
  * \param pool_type - is the pool type, either LQUOTA_RES_MD or LQUOTA_RES_DT.