From 135af49da5ebec0b597a49d4f136694d2cdc7899 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 3 Feb 2011 16:03:13 +0000 Subject: [PATCH] Increase hash table size to 1024 lv names and 64 pv uuids --- WHATS_NEW | 1 + daemons/clvmd/lvm-functions.c | 2 +- lib/format_text/import_vsn1.c | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 440b6c677..5a3c4b932 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.83 - =================================== + Increase hash table size to 1024 lv names and 64 pv uuids. Remove fs_unlock() from lv_resume path. Fix wipe size when setting up mda. Remove unneeded checks for open_count in lv_info(). diff --git a/daemons/clvmd/lvm-functions.c b/daemons/clvmd/lvm-functions.c index ad11f99c3..4039bb2f4 100644 --- a/daemons/clvmd/lvm-functions.c +++ b/daemons/clvmd/lvm-functions.c @@ -197,7 +197,7 @@ static int get_current_lock(char *resource) void init_lvhash() { /* Create hash table for keeping LV locks & status */ - lv_hash = dm_hash_create(100); + lv_hash = dm_hash_create(1024); pthread_mutex_init(&lv_hash_lock, NULL); pthread_mutex_init(&lvm_lock, NULL); } diff --git a/lib/format_text/import_vsn1.c b/lib/format_text/import_vsn1.c index 5fac7c49e..0ffe3340f 100644 --- a/lib/format_text/import_vsn1.c +++ b/lib/format_text/import_vsn1.c @@ -756,7 +756,7 @@ static struct volume_group *_read_vg(struct format_instance *fid, * The pv hash memorises the pv section names -> pv * structures. */ - if (!(pv_hash = dm_hash_create(32))) { + if (!(pv_hash = dm_hash_create(64))) { log_error("Couldn't create hash table."); goto bad; } @@ -784,7 +784,7 @@ static struct volume_group *_read_vg(struct format_instance *fid, * The lv hash memorises the lv section names -> lv * structures. */ - if (!(lv_hash = dm_hash_create(32))) { + if (!(lv_hash = dm_hash_create(1024))) { log_error("Couldn't create hash table."); goto bad; } -- 2.43.5