mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
hash: change name of new lookup function
This commit is contained in:
parent
4d37db123d
commit
931fede81b
@ -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;
|
||||
|
@ -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
|
||||
|
@ -232,7 +232,7 @@ 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,
|
||||
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;
|
||||
|
@ -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,7 +1897,7 @@ 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,
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user