master - hash: change name of new lookup function
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=931fede81b5fdc3aecd730567fefc3e31c5275ce Commit: 931fede81b5fdc3aecd730567fefc3e31c5275ce Parent: 4d37db123d4ea2735c538bf9ad8a57be051ac9c3 Author: David Teigland <[email protected]> AuthorDate: Tue Nov 17 11:59:44 2015 -0600 Committer: David Teigland <[email protected]> CommitterDate: Tue Nov 17 11:59:44 2015 -0600
hash: change name of new lookup function
--- daemons/lvmetad/lvmetad-core.c | 6 +++--- libdm/.exported_symbols.Base | 2 +- libdm/datastruct/hash.c | 4 ++-- libdm/libdevmapper.h | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-)
daemons/lvmetad/lvmetad-core.c +3 -3
@@ -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;
libdm/.exported_symbols.Base +1 -1
@@ -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
libdm/datastruct/hash.c +2 -2
@@ -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;
libdm/libdevmapper.h +3 -3
@@ -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);