diff --git a/WHATS_NEW b/WHATS_NEW index f7b39b9d9..aedaceefd 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.166 - ===================================== + Use dm_config_parse_without_dup_node_check() to speedup metadata reading. Fix lvconvert --repair regression Fix reported origin lv field for cache volumes. (2.02.133) Always specify snapshot cow LV for monitoring not internal LV. (2.02.165) diff --git a/daemons/lvmetad/lvmetad-core.c b/daemons/lvmetad/lvmetad-core.c index ebaca7872..36a5cec74 100644 --- a/daemons/lvmetad/lvmetad-core.c +++ b/daemons/lvmetad/lvmetad-core.c @@ -599,7 +599,7 @@ static void mark_outdated_pv(lvmetad_state *s, const char *vgid, const char *pvi outdated_pvs = dm_hash_lookup(s->vgid_to_outdated_pvs, vgid); if (!outdated_pvs) { - if (!(outdated_pvs = dm_config_from_string("outdated_pvs/pv_list = []")) || + if (!(outdated_pvs = config_tree_from_string_without_dup_node_check("outdated_pvs/pv_list = []")) || !(cft_vgid = make_text_node(outdated_pvs, "vgid", dm_pool_strdup(outdated_pvs->mem, vgid), outdated_pvs->root, NULL))) abort(); diff --git a/daemons/lvmlockd/lvmlockd-core.c b/daemons/lvmlockd/lvmlockd-core.c index 8fcbdecf1..4d96e6726 100644 --- a/daemons/lvmlockd/lvmlockd-core.c +++ b/daemons/lvmlockd/lvmlockd-core.c @@ -4431,7 +4431,7 @@ static void client_recv_action(struct client *cl) return; } - req.cft = dm_config_from_string(req.buffer.mem); + req.cft = config_tree_from_string_without_dup_node_check(req.buffer.mem); if (!req.cft) { log_error("client recv %u config_from_string error", cl->id); buffer_destroy(&req.buffer); diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c index 6ce778de7..5e402f09e 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -1275,7 +1275,7 @@ struct volume_group *lvmcache_get_vg(struct cmd_context *cmd, const char *vgname /* Build config tree from vgmetadata, if not yet cached */ if (!vginfo->cft && !(vginfo->cft = - dm_config_from_string(vginfo->vgmetadata))) + config_tree_from_string_without_dup_node_check(vginfo->vgmetadata))) goto_bad; if (!(vg = import_vg_from_config_tree(vginfo->cft, fid))) diff --git a/lib/format_text/export.c b/lib/format_text/export.c index 810c93205..1ecc362b9 100644 --- a/lib/format_text/export.c +++ b/lib/format_text/export.c @@ -22,6 +22,7 @@ #include "text_export.h" #include "lvm-version.h" #include "toolcontext.h" +#include "config-util.h" #include #include @@ -1077,7 +1078,7 @@ struct dm_config_tree *export_vg_to_config_tree(struct volume_group *vg) return_NULL; } - if (!(vg_cft = dm_config_from_string(buf))) { + if (!(vg_cft = config_tree_from_string_without_dup_node_check(buf))) { log_error("Error parsing metadata for VG %s.", vg->name); dm_free(buf); return_NULL; diff --git a/libdaemon/client/daemon-client.c b/libdaemon/client/daemon-client.c index 413d75726..5ce1fc09a 100644 --- a/libdaemon/client/daemon-client.c +++ b/libdaemon/client/daemon-client.c @@ -120,7 +120,7 @@ daemon_reply daemon_send(daemon_handle h, daemon_request rq) reply.error = errno; if (buffer_read(h.socket_fd, &reply.buffer)) { - reply.cft = dm_config_from_string(reply.buffer.mem); + reply.cft = config_tree_from_string_without_dup_node_check(reply.buffer.mem); if (!reply.cft) reply.error = EPROTO; } else diff --git a/libdaemon/server/daemon-server.c b/libdaemon/server/daemon-server.c index 0e37dfbf9..6af6de99b 100644 --- a/libdaemon/server/daemon-server.c +++ b/libdaemon/server/daemon-server.c @@ -444,7 +444,7 @@ static void *_client_thread(void *state) if (!buffer_read(ts->client.socket_fd, &req.buffer)) goto fail; - req.cft = dm_config_from_string(req.buffer.mem); + req.cft = config_tree_from_string_without_dup_node_check(req.buffer.mem); if (!req.cft) fprintf(stderr, "error parsing request:\n %s\n", req.buffer.mem);