From 186a3da998b13505990809466f0e5708cfdd6c2a Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 16 Oct 2017 15:05:57 +0200 Subject: [PATCH] thin: monitor also external origin Add missing monitoring for external origin LVs and add -real suffix for UUID used for monitoring of external origin. --- WHATS_NEW | 1 + lib/activate/activate.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index ebdc03639..4ad6b1f88 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.176 - =================================== + Monitor external origin LVs. Remove the replicator code, including configure --with-replicators. Allow lvcreate --type mirror to work with 100%FREE. Improve selection of resource name for complex volume activation lock. diff --git a/lib/activate/activate.c b/lib/activate/activate.c index edbb451be..5542f8434 100644 --- a/lib/activate/activate.c +++ b/lib/activate/activate.c @@ -1707,7 +1707,7 @@ static char *_build_target_uuid(struct cmd_context *cmd, const struct logical_vo if (lv_is_thin_pool(lv)) layer = "tpool"; /* Monitor "tpool" for the "thin pool". */ - else if (lv_is_origin(lv)) + else if (lv_is_origin(lv) || lv_is_external_origin(lv)) layer = "real"; /* Monitor "real" for "snapshot-origin". */ else layer = NULL; @@ -1949,6 +1949,13 @@ int monitor_dev_for_events(struct cmd_context *cmd, const struct logical_volume r = 0; } + if (seg->external_lv && + !monitor_dev_for_events(cmd, seg->external_lv, + (!monitor) ? laopts : NULL, monitor)) { + stack; + r = 0; + } + if (seg->metadata_lv && !monitor_dev_for_events(cmd, seg->metadata_lv, NULL, monitor)) { stack;