dtree->mem = dmem;
dtree->optional_uuid_suffixes = NULL;
- if (!(dtree->devs = dm_hash_create(8))) {
+ if (!(dtree->devs = dm_hash_create(61))) {
log_error("dtree hash creation failed");
dm_pool_destroy(dtree->mem);
return NULL;
}
- if (!(dtree->uuids = dm_hash_create(32))) {
+ if (!(dtree->uuids = dm_hash_create(31))) {
log_error("dtree uuid hash creation failed");
dm_hash_destroy(dtree->devs);
dm_pool_destroy(dtree->mem);
int dm_report_value_cache_set(struct dm_report *rh, const char *name, const void *data)
{
- if (!rh->value_cache && (!(rh->value_cache = dm_hash_create(64)))) {
+ if (!rh->value_cache && (!(rh->value_cache = dm_hash_create(63)))) {
log_error("Failed to create cache for values used during reporting.");
return 0;
}
dm_list_init(&_unused_duplicates);
dm_list_init(&_prev_unused_duplicate_devs);
- if (!(_vgname_hash = dm_hash_create(128)))
+ if (!(_vgname_hash = dm_hash_create(127)))
return 0;
- if (!(_vgid_hash = dm_hash_create(128)))
+ if (!(_vgid_hash = dm_hash_create(126)))
return 0;
- if (!(_pvid_hash = dm_hash_create(128)))
+ if (!(_pvid_hash = dm_hash_create(125)))
return 0;
return 1;
* If section name is variable, use '#' as a substitute.
*/
if (!handle->cmd->cft_def_hash) {
- if (!(handle->cmd->cft_def_hash = dm_hash_create(64))) {
+ if (!(handle->cmd->cft_def_hash = dm_hash_create(60))) {
log_error("Failed to create configuration definition hash.");
r = 0; goto out;
}
if (!(_cache.mem = dm_pool_create("dev_cache", 10 * 1024)))
return_0;
- if (!(_cache.names = dm_hash_create(128)) ||
- !(_cache.vgid_index = dm_hash_create(32)) ||
- !(_cache.lvid_index = dm_hash_create(32))) {
+ if (!(_cache.names = dm_hash_create(120)) ||
+ !(_cache.vgid_index = dm_hash_create(30)) ||
+ !(_cache.lvid_index = dm_hash_create(29))) {
dm_pool_destroy(_cache.mem);
_cache.mem = 0;
return_0;
return NULL;
}
- if (!(hash = dm_hash_create(128))) {
+ if (!(hash = dm_hash_create(110))) {
log_error("mpath hash table creation failed.");
return NULL;
}
if (pf->devices)
dm_hash_destroy(pf->devices);
- if (!(pf->devices = dm_hash_create(128)))
+ if (!(pf->devices = dm_hash_create(111)))
return_0;
return 1;
if (!(f->mem = dm_pool_create("text pv_names", 512)))
return_0;
- if (!(f->pv_names = dm_hash_create(128)))
+ if (!(f->pv_names = dm_hash_create(115)))
return_0;
dm_list_iterate_items(pvl, &vg->pvs) {
vg_name = fic->context.vg_ref.vg_name;
vg_id = fic->context.vg_ref.vg_id;
- if (!(fid->metadata_areas_index = dm_hash_create(128))) {
+ if (!(fid->metadata_areas_index = dm_hash_create(116))) {
log_error("Couldn't create metadata index for format "
"instance of VG %s.", vg_name);
return 0;
* The pv hash memorises the pv section names -> pv
* structures.
*/
- if (!(pv_hash = dm_hash_create(64))) {
+ if (!(pv_hash = dm_hash_create(59))) {
log_error("Couldn't create pv hash table.");
goto bad;
}
* The lv hash memorises the lv section names -> lv
* structures.
*/
- if (!(lv_hash = dm_hash_create(1024))) {
+ if (!(lv_hash = dm_hash_create(1023))) {
log_error("Couldn't create lv hash table.");
goto bad;
}
if (log_once) {
if (!_duplicated)
- _duplicated = dm_hash_create(128);
+ _duplicated = dm_hash_create(117);
if (_duplicated) {
if (dm_hash_lookup(_duplicated, message))
level = _LOG_NOTICE;
vg->vgmem = vgmem;
vg->alloc = ALLOC_NORMAL;
- if (!(vg->hostnames = dm_hash_create(16))) {
+ if (!(vg->hostnames = dm_hash_create(14))) {
log_error("Failed to allocate VG hostname hashtable.");
dm_pool_destroy(vgmem);
return NULL;