mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-30 17:18:21 +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;
|
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);
|
ERROR(s, "update_metadata_new_vgid out of memory for vgid hash insert for %s %s", arg_name, new_vgid);
|
||||||
abort_daemon = 1;
|
abort_daemon = 1;
|
||||||
goto out;
|
goto out;
|
||||||
@ -1215,7 +1215,7 @@ static int _update_metadata_new_name(lvmetad_state *s,
|
|||||||
goto out;
|
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);
|
ERROR(s, "update_metadata_new_name out of memory for vgid hash insert for %s %s", new_name, arg_vgid);
|
||||||
abort_daemon = 1;
|
abort_daemon = 1;
|
||||||
goto out;
|
goto out;
|
||||||
@ -1284,7 +1284,7 @@ static int _update_metadata_add_new(lvmetad_state *s, const char *new_name, cons
|
|||||||
goto out;
|
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);
|
ERROR(s, "update_metadata_add_new out of memory for vgid hash insert for %s %s", new_name, new_vgid);
|
||||||
abort_daemon = 1;
|
abort_daemon = 1;
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -95,7 +95,7 @@ dm_hash_wipe
|
|||||||
dm_hash_lookup_with_val
|
dm_hash_lookup_with_val
|
||||||
dm_hash_lookup_with_count
|
dm_hash_lookup_with_count
|
||||||
dm_hash_remove_with_val
|
dm_hash_remove_with_val
|
||||||
dm_hash_insert_multival
|
dm_hash_insert_allow_multiple
|
||||||
dm_is_dm_major
|
dm_is_dm_major
|
||||||
dm_is_empty_dir
|
dm_is_empty_dir
|
||||||
dm_lib_exit
|
dm_lib_exit
|
||||||
|
@ -232,8 +232,8 @@ static struct dm_hash_node **_find_str_with_val(struct dm_hash_table *t,
|
|||||||
return NULL;
|
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)
|
const void *val, uint32_t val_len)
|
||||||
{
|
{
|
||||||
struct dm_hash_node *n;
|
struct dm_hash_node *n;
|
||||||
struct dm_hash_node *first;
|
struct dm_hash_node *first;
|
||||||
|
@ -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.
|
* val_len is the size of the data being inserted.
|
||||||
*
|
*
|
||||||
* If two entries with the same key exist,
|
* 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() returns the first one it finds, and
|
||||||
* dm_hash_lookup_with_val() returns the one with a matching
|
* dm_hash_lookup_with_val() returns the one with a matching
|
||||||
* val_len/val.
|
* 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);
|
const void *val, uint32_t val_len);
|
||||||
void dm_hash_remove_with_val(struct dm_hash_table *t, const char *key,
|
void dm_hash_remove_with_val(struct dm_hash_table *t, const char *key,
|
||||||
const void *val, uint32_t val_len);
|
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);
|
const void *val, uint32_t val_len);
|
||||||
void *dm_hash_lookup_with_count(struct dm_hash_table *t, const char *key, int *count);
|
void *dm_hash_lookup_with_count(struct dm_hash_table *t, const char *key, int *count);
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user