X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Flod%2Flod_pool.c;h=da5389c817019af33e26c6c015acc518aa85e25f;hb=bcbcd5873589c71a5d1028c14e74f8897fc3ffc0;hp=c54f1c8cee353ddc020e711c612a67cd015d12d5;hpb=0b85782334b5f0c2ef362b35ea672ddc575cbc30;p=fs%2Flustre-release.git diff --git a/lustre/lod/lod_pool.c b/lustre/lod/lod_pool.c index c54f1c8..da5389c 100644 --- a/lustre/lod/lod_pool.c +++ b/lustre/lod/lod_pool.c @@ -140,7 +140,8 @@ static void pool_putref_locked(struct pool_desc *pool) * * \retval computed hash value from \a key and limited by \a mask */ -static __u32 pool_hashfn(cfs_hash_t *hash_body, const void *key, unsigned mask) +static __u32 pool_hashfn(struct cfs_hash *hash_body, const void *key, + unsigned mask) { return cfs_hash_djb2_hash(key, strnlen(key, LOV_MAXPOOLNAME), mask); } @@ -195,7 +196,7 @@ static void *pool_hashobject(struct hlist_node *hnode) return hlist_entry(hnode, struct pool_desc, pool_hash); } -static void pool_hashrefcount_get(cfs_hash_t *hs, struct hlist_node *hnode) +static void pool_hashrefcount_get(struct cfs_hash *hs, struct hlist_node *hnode) { struct pool_desc *pool; @@ -203,7 +204,7 @@ static void pool_hashrefcount_get(cfs_hash_t *hs, struct hlist_node *hnode) pool_getref(pool); } -static void pool_hashrefcount_put_locked(cfs_hash_t *hs, +static void pool_hashrefcount_put_locked(struct cfs_hash *hs, struct hlist_node *hnode) { struct pool_desc *pool; @@ -212,7 +213,7 @@ static void pool_hashrefcount_put_locked(cfs_hash_t *hs, pool_putref_locked(pool); } -cfs_hash_ops_t pool_hash_operations = { +struct cfs_hash_ops pool_hash_operations = { .hs_hash = pool_hashfn, .hs_key = pool_key, .hs_keycmp = pool_hashkey_keycmp, @@ -660,21 +661,17 @@ int lod_pool_new(struct obd_device *obd, char *poolname) if (rc) GOTO(out_err, rc); - memset(&new_pool->pool_rr, 0, sizeof(new_pool->pool_rr)); + lod_qos_rr_init(&new_pool->pool_rr); rc = lod_ost_pool_init(&new_pool->pool_rr.lqr_pool, 0); if (rc) GOTO(out_free_pool_obds, rc); INIT_HLIST_NODE(&new_pool->pool_hash); -#ifdef LPROCFS +#ifdef CONFIG_PROC_FS pool_getref(new_pool); new_pool->pool_proc_entry = lprocfs_add_simple(lod->lod_pool_proc_entry, - poolname, -#ifndef HAVE_ONLY_PROCFS_SEQ - NULL, NULL, -#endif - new_pool, + poolname, new_pool, &pool_proc_operations); if (IS_ERR(new_pool->pool_proc_entry)) { CDEBUG(D_CONFIG, "%s: cannot add proc entry "LOV_POOLNAMEF"\n",