diff --git a/daemons/lvmetad/lvmetad-core.c b/daemons/lvmetad/lvmetad-core.c index 5bed5628b..7af9bde1c 100644 --- a/daemons/lvmetad/lvmetad-core.c +++ b/daemons/lvmetad/lvmetad-core.c @@ -1101,7 +1101,7 @@ static int _update_metadata_new_vgid(lvmetad_state *s, goto out; } - if (!dm_hash_insert_multival(s->vgname_to_vgid, arg_name, new_vgid_dup, strlen(new_vgid_dup) + 1)) { + if (!dm_hash_insert_allow_multiple(s->vgname_to_vgid, arg_name, new_vgid_dup, strlen(new_vgid_dup) + 1)) { ERROR(s, "update_metadata_new_vgid out of memory for vgid hash insert for %s %s", arg_name, new_vgid); abort_daemon = 1; goto out; @@ -1215,7 +1215,7 @@ static int _update_metadata_new_name(lvmetad_state *s, goto out; } - if (!dm_hash_insert_multival(s->vgname_to_vgid, new_name, arg_vgid_dup, strlen(arg_vgid_dup) + 1)) { + if (!dm_hash_insert_allow_multiple(s->vgname_to_vgid, new_name, arg_vgid_dup, strlen(arg_vgid_dup) + 1)) { ERROR(s, "update_metadata_new_name out of memory for vgid hash insert for %s %s", new_name, arg_vgid); abort_daemon = 1; goto out; @@ -1284,7 +1284,7 @@ static int _update_metadata_add_new(lvmetad_state *s, const char *new_name, cons goto out; } - if (!dm_hash_insert_multival(s->vgname_to_vgid, new_name, new_vgid_dup, strlen(new_vgid_dup) + 1)) { + if (!dm_hash_insert_allow_multiple(s->vgname_to_vgid, new_name, new_vgid_dup, strlen(new_vgid_dup) + 1)) { ERROR(s, "update_metadata_add_new out of memory for vgid hash insert for %s %s", new_name, new_vgid); abort_daemon = 1; goto out; diff --git a/libdm/.exported_symbols.Base b/libdm/.exported_symbols.Base index 47097fc98..ee7c4f2cc 100644 --- a/libdm/.exported_symbols.Base +++ b/libdm/.exported_symbols.Base @@ -95,7 +95,7 @@ dm_hash_wipe dm_hash_lookup_with_val dm_hash_lookup_with_count dm_hash_remove_with_val -dm_hash_insert_multival +dm_hash_insert_allow_multiple dm_is_dm_major dm_is_empty_dir dm_lib_exit diff --git a/libdm/datastruct/hash.c b/libdm/datastruct/hash.c index 2c5108d54..f9b8b9cd7 100644 --- a/libdm/datastruct/hash.c +++ b/libdm/datastruct/hash.c @@ -232,8 +232,8 @@ static struct dm_hash_node **_find_str_with_val(struct dm_hash_table *t, return NULL; } -int dm_hash_insert_multival(struct dm_hash_table *t, const char *key, - const void *val, uint32_t val_len) +int dm_hash_insert_allow_multiple(struct dm_hash_table *t, const char *key, + const void *val, uint32_t val_len) { struct dm_hash_node *n; struct dm_hash_node *first; diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h index e02a3bcd9..6619aa7af 100644 --- a/libdm/libdevmapper.h +++ b/libdm/libdevmapper.h @@ -1859,7 +1859,7 @@ struct dm_hash_node *dm_hash_get_next(struct dm_hash_table *t, struct dm_hash_no * val_len is the size of the data being inserted. * * If two entries with the same key exist, - * (added using dm_hash_insert_multival), then: + * (added using dm_hash_insert_allow_multiple), then: * . dm_hash_lookup() returns the first one it finds, and * dm_hash_lookup_with_val() returns the one with a matching * val_len/val. @@ -1897,8 +1897,8 @@ void *dm_hash_lookup_with_val(struct dm_hash_table *t, const char *key, const void *val, uint32_t val_len); void dm_hash_remove_with_val(struct dm_hash_table *t, const char *key, const void *val, uint32_t val_len); -int dm_hash_insert_multival(struct dm_hash_table *t, const char *key, - const void *val, uint32_t val_len); +int dm_hash_insert_allow_multiple(struct dm_hash_table *t, const char *key, + const void *val, uint32_t val_len); void *dm_hash_lookup_with_count(struct dm_hash_table *t, const char *key, int *count);