From: Robert Read Date: Sat, 23 Jan 2010 00:29:27 +0000 (-0800) Subject: b=18690 Enable rehashing and increase max hash table sizes. X-Git-Tag: 1.10.0.36~19 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=b3f5156084edcebb714bb6d77fca4152fe3b045f b=18690 Enable rehashing and increase max hash table sizes. i=eric.mei --- diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index 9f84ece..135458d 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -804,8 +804,8 @@ int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg) cfs_waitq_init(&lov->lov_qos.lq_statfs_waitq); lov->lov_pools_hash_body = cfs_hash_create("POOLS", HASH_POOLS_CUR_BITS, - HASH_POOLS_CUR_BITS, - &pool_hash_operations, 0); + HASH_POOLS_MAX_BITS, + &pool_hash_operations, CFS_HASH_REHASH); CFS_INIT_LIST_HEAD(&lov->lov_pool_list); lov->lov_pool_count = 0; rc = lov_ost_pool_init(&lov->lov_packed, 0); diff --git a/lustre/obdclass/obd_config.c b/lustre/obdclass/obd_config.c index 44d94dd..8a6766f 100644 --- a/lustre/obdclass/obd_config.c +++ b/lustre/obdclass/obd_config.c @@ -358,24 +358,24 @@ int class_setup(struct obd_device *obd, struct lustre_cfg *lcfg) /* create an uuid-export lustre hash */ obd->obd_uuid_hash = cfs_hash_create("UUID_HASH", HASH_UUID_CUR_BITS, - HASH_UUID_CUR_BITS, - &uuid_hash_ops, 0); + HASH_UUID_MAX_BITS, + &uuid_hash_ops, CFS_HASH_REHASH); if (!obd->obd_uuid_hash) GOTO(err_hash, err = -ENOMEM); /* create a nid-export lustre hash */ obd->obd_nid_hash = cfs_hash_create("NID_HASH", HASH_NID_CUR_BITS, - HASH_NID_CUR_BITS, - &nid_hash_ops, 0); + HASH_NID_MAX_BITS, + &nid_hash_ops, CFS_HASH_REHASH); if (!obd->obd_nid_hash) GOTO(err_hash, err = -ENOMEM); /* create a nid-stats lustre hash */ obd->obd_nid_stats_hash = cfs_hash_create("NID_STATS", HASH_NID_STATS_CUR_BITS, - HASH_NID_STATS_CUR_BITS, - &nid_stat_hash_ops, 0); + HASH_NID_STATS_MAX_BITS, + &nid_stat_hash_ops, CFS_HASH_REHASH); if (!obd->obd_nid_stats_hash) GOTO(err_hash, err = -ENOMEM);