mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-30 17:18:21 +03:00
hash: increase some default hash table size
Size of these hashes was quite small, so raise the size of hashed entries to reduce amount of hash collistion. Select some unique/unused number for hash_create below 8192.
This commit is contained in:
parent
93115ef91d
commit
bbe1b93ed9
@ -1311,7 +1311,7 @@ int dev_cache_init(struct cmd_context *cmd)
|
||||
if (!(_cache.mem = dm_pool_create("dev_cache", 10 * 1024)))
|
||||
return_0;
|
||||
|
||||
if (!(_cache.names = dm_hash_create(1020)) ||
|
||||
if (!(_cache.names = dm_hash_create(8190)) ||
|
||||
!(_cache.vgid_index = dm_hash_create(30)) ||
|
||||
!(_cache.lvid_index = dm_hash_create(29))) {
|
||||
dm_pool_destroy(_cache.mem);
|
||||
|
@ -58,7 +58,7 @@ static int _init_hash(struct pfilter *pf)
|
||||
if (pf->devices)
|
||||
dm_hash_destroy(pf->devices);
|
||||
|
||||
if (!(pf->devices = dm_hash_create(511)))
|
||||
if (!(pf->devices = dm_hash_create(8191)))
|
||||
return_0;
|
||||
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user