From aa68b898ff9c51dcbd87c6be34632e33f0299a18 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 24 Nov 2017 13:57:22 +0100 Subject: [PATCH] libdm: preload propagates delayed resume Propagate delayed resume at least for preload case in a simple way. Currently PVMOVE depends on internal logic where 'mirror' with corelog is 'possible' PVMOVE. In such case resume of 'created' node is 'delayed'. This is mostly an ugly internal hack - but for the moment being when we add propagation for preload - it does work reasonable. TODO: provide standard API and avoid this internal 'guessing'. --- WHATS_NEW_DM | 1 + libdm/libdm-deptree.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index b7f71ca79..9cec9532a 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.146 - ==================================== + Propagate delayed resume for pvmove subvolumes. Suppress integrity encryption keys in 'table' output unless --showkeys supplied. Version 1.02.145 - 3rd November 2017 diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c index b0a48f359..547904fb2 100644 --- a/libdm/libdm-deptree.c +++ b/libdm/libdm-deptree.c @@ -2962,6 +2962,10 @@ 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; + /* Skip existing non-device-mapper devices */ if (!child->info.exists && child->info.major) continue;