Whamcloud - gitweb
LU-8596 tests: lnet-selftest test failed.
[fs/lustre-release.git] / lustre / osc / osc_quota.c
index 1524ea7..f259f49 100644 (file)
@@ -23,7 +23,7 @@
 /*
  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  *
- * Copyright (c) 2012, 2013, Intel Corporation.
+ * Copyright (c) 2012, 2015, Intel Corporation.
  *
  * Code originally extracted from quota directory
  */
@@ -47,7 +47,7 @@ int osc_quota_chkdq(struct client_obd *cli, const unsigned int qid[])
        int type;
        ENTRY;
 
-       for (type = 0; type < MAXQUOTAS; type++) {
+       for (type = 0; type < LL_MAXQUOTAS; type++) {
                struct osc_quota_info *oqi;
 
                oqi = cfs_hash_lookup(cli->cl_quota_hash[type], &qid[type]);
@@ -81,7 +81,7 @@ int osc_quota_setdq(struct client_obd *cli, const unsigned int qid[],
        if ((valid & (OBD_MD_FLUSRQUOTA | OBD_MD_FLGRPQUOTA)) == 0)
                RETURN(0);
 
-       for (type = 0; type < MAXQUOTAS; type++) {
+       for (type = 0; type < LL_MAXQUOTAS; type++) {
                struct osc_quota_info *oqi;
 
                if ((valid & MD_QUOTA_FLAG(type)) == 0)
@@ -110,7 +110,7 @@ int osc_quota_setdq(struct client_obd *cli, const unsigned int qid[],
                        }
 
                        CDEBUG(D_QUOTA, "%s: setdq to insert for %s %d (%d)\n",
-                              cli->cl_import->imp_obd->obd_name,
+                              cli_name(cli),
                               type == USRQUOTA ? "user" : "group",
                               qid[type], rc);
                } else {
@@ -125,7 +125,7 @@ int osc_quota_setdq(struct client_obd *cli, const unsigned int qid[],
                                OBD_SLAB_FREE_PTR(oqi, osc_quota_kmem);
 
                        CDEBUG(D_QUOTA, "%s: setdq to remove for %s %d (%p)\n",
-                              cli->cl_import->imp_obd->obd_name,
+                              cli_name(cli),
                               type == USRQUOTA ? "user" : "group",
                               qid[type], oqi);
                }
@@ -138,7 +138,7 @@ int osc_quota_setdq(struct client_obd *cli, const unsigned int qid[],
  * Hash operations for uid/gid <-> osc_quota_info
  */
 static unsigned
-oqi_hashfn(cfs_hash_t *hs, const void *key, unsigned mask)
+oqi_hashfn(struct cfs_hash *hs, const void *key, unsigned mask)
 {
        return cfs_hash_u32_hash(*((__u32*)key), mask);
 }
@@ -171,17 +171,17 @@ oqi_object(struct hlist_node *hnode)
 }
 
 static void
-oqi_get(cfs_hash_t *hs, struct hlist_node *hnode)
+oqi_get(struct cfs_hash *hs, struct hlist_node *hnode)
 {
 }
 
 static void
-oqi_put_locked(cfs_hash_t *hs, struct hlist_node *hnode)
+oqi_put_locked(struct cfs_hash *hs, struct hlist_node *hnode)
 {
 }
 
 static void
-oqi_exit(cfs_hash_t *hs, struct hlist_node *hnode)
+oqi_exit(struct cfs_hash *hs, struct hlist_node *hnode)
 {
        struct osc_quota_info *oqi;
 
@@ -194,7 +194,7 @@ oqi_exit(cfs_hash_t *hs, struct hlist_node *hnode)
 #define HASH_QUOTA_CUR_BITS 5
 #define HASH_QUOTA_MAX_BITS 15
 
-static cfs_hash_ops_t quota_hash_ops = {
+static struct cfs_hash_ops quota_hash_ops = {
        .hs_hash        = oqi_hashfn,
        .hs_keycmp      = oqi_keycmp,
        .hs_key         = oqi_key,
@@ -210,7 +210,7 @@ int osc_quota_setup(struct obd_device *obd)
        int i, type;
        ENTRY;
 
-       for (type = 0; type < MAXQUOTAS; type++) {
+       for (type = 0; type < LL_MAXQUOTAS; type++) {
                cli->cl_quota_hash[type] = cfs_hash_create("QUOTA_HASH",
                                                           HASH_QUOTA_CUR_BITS,
                                                           HASH_QUOTA_MAX_BITS,
@@ -224,7 +224,7 @@ int osc_quota_setup(struct obd_device *obd)
                        break;
        }
 
-       if (type == MAXQUOTAS)
+       if (type == LL_MAXQUOTAS)
                RETURN(0);
 
        for (i = 0; i < type; i++)
@@ -239,7 +239,7 @@ int osc_quota_cleanup(struct obd_device *obd)
        int type;
        ENTRY;
 
-       for (type = 0; type < MAXQUOTAS; type++)
+       for (type = 0; type < LL_MAXQUOTAS; type++)
                cfs_hash_putref(cli->cl_quota_hash[type]);
 
        RETURN(0);