diff --git a/lib/mirror/mirrored.c b/lib/mirror/mirrored.c index 4891fb707..602c30a2b 100644 --- a/lib/mirror/mirrored.c +++ b/lib/mirror/mirrored.c @@ -303,7 +303,7 @@ static int _add_log(struct dm_pool *mem, struct lv_segment *seg, } } else { /* If core log, use mirror's UUID and set DM_CORELOG flag */ - if (!(log_dlid = build_dm_uuid(mem, seg->lv, NULL))) { + if (!(log_dlid = build_dm_uuid(mem, seg->lv, lv_is_pvmove(seg->lv) ? "pvmove" : NULL))) { log_error("Failed to build uuid for mirror LV %s.", seg->lv->name); return 0; diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c index 547904fb2..d460ce1db 100644 --- a/libdm/libdm-deptree.c +++ b/libdm/libdm-deptree.c @@ -2963,8 +2963,8 @@ int dm_tree_preload_children(struct dm_tree_node *dnode, /* Preload children first */ while ((child = dm_tree_next_child(&handle, dnode, 0))) { /* Propagate delay of resume from parent node */ - if (dnode->props.delay_resume_if_new) - child->props.delay_resume_if_new = 1; + if (dnode->props.delay_resume_if_new > 1) + child->props.delay_resume_if_new = dnode->props.delay_resume_if_new; /* Skip existing non-device-mapper devices */ if (!child->info.exists && child->info.major) @@ -3342,7 +3342,8 @@ int dm_tree_node_add_mirror_target_log(struct dm_tree_node *node, } if ((flags & DM_CORELOG)) /* For pvmove: immediate resume (for size validation) isn't needed. */ - node->props.delay_resume_if_new = 1; + /* pvmove flag passed via unused UUID and its suffix */ + node->props.delay_resume_if_new = strstr(log_uuid, "pvmove") ? 2 : 1; else { if (!(log_node = dm_tree_find_node_by_uuid(node->dtree, log_uuid))) { log_error("Couldn't find mirror log uuid %s.", log_uuid);