From 8c7400121ef5e34d7ddbcb11068648aa00a506f7 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 4 Mar 2024 11:44:50 +0100 Subject: [PATCH] debug: trace when ignoring origin_only suspend Add log debug message when origin_only suspend would be ignored. --- lib/activate/activate.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/activate/activate.c b/lib/activate/activate.c index 14adc7320..e6697d429 100644 --- a/lib/activate/activate.c +++ b/lib/activate/activate.c @@ -2105,9 +2105,13 @@ static int _lv_suspend(struct cmd_context *cmd, const char *lvid_s, /* Ignore origin_only unless LV is origin in both old and new metadata */ /* or LV is thin or thin pool volume */ - if (!lv_is_thin_volume(lv) && !lv_is_thin_pool(lv) && - !(lv_is_origin(lv) && lv_is_origin(lv_pre))) + if (laopts->origin_only && + !lv_is_thin_volume(lv) && !lv_is_thin_pool(lv) && + !(lv_is_origin(lv) && lv_is_origin(lv_pre))) { + log_debug_activation("Not using origin only for suspend of %s.", + display_lvname(lv)); laopts->origin_only = 0; + } /* * Preload devices for the LV.