X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Flod%2Flod_lov.c;h=37f2b2cc753348df1709a6d377007e8ff4a8f5d7;hp=f601afee4ab03a24596c75caadbe9699bea22e10;hb=2124e07ddde7789ebf0e8ec5600f2aff31788123;hpb=c2c45b21c3549355a9b3ecb7d1639415fe3131df diff --git a/lustre/lod/lod_lov.c b/lustre/lod/lod_lov.c index f601afe..37f2b2c 100644 --- a/lustre/lod/lod_lov.c +++ b/lustre/lod/lod_lov.c @@ -2109,14 +2109,9 @@ int lod_pools_init(struct lod_device *lod, struct lustre_cfg *lcfg) lod->lod_sp_me = LUSTRE_SP_CLI; /* Set up OST pool environment */ - lod->lod_pools_hash_body = cfs_hash_create("POOLS", HASH_POOLS_CUR_BITS, - HASH_POOLS_MAX_BITS, - HASH_POOLS_BKT_BITS, 0, - CFS_HASH_MIN_THETA, - CFS_HASH_MAX_THETA, - &pool_hash_operations, - CFS_HASH_DEFAULT); - if (lod->lod_pools_hash_body == NULL) + lod->lod_pool_count = 0; + rc = lod_pool_hash_init(&lod->lod_pools_hash_body); + if (rc) RETURN(-ENOMEM); INIT_LIST_HEAD(&lod->lod_pool_list); @@ -2146,7 +2141,7 @@ out_mdt_rr_pool: out_mdt_pool: lod_tgt_pool_free(&lod->lod_mdt_descs.ltd_tgt_pool); out_hash: - cfs_hash_putref(lod->lod_pools_hash_body); + lod_pool_hash_destroy(&lod->lod_pools_hash_body); return rc; } @@ -2173,7 +2168,7 @@ int lod_pools_fini(struct lod_device *lod) lod_pool_del(obd, pool->pool_name); } - cfs_hash_putref(lod->lod_pools_hash_body); + lod_pool_hash_destroy(&lod->lod_pools_hash_body); lod_tgt_pool_free(&lod->lod_ost_descs.ltd_qos.lq_rr.lqr_pool); lod_tgt_pool_free(&lod->lod_ost_descs.ltd_tgt_pool); lod_tgt_pool_free(&lod->lod_mdt_descs.ltd_qos.lq_rr.lqr_pool);