From 00b5d7b037dced08d31254bce1980caabf266474 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 5 Jul 2023 00:50:54 +0200 Subject: [PATCH] lv: followup seg_monitor reporting With 3596558861e62ca0c6f37bfba6a4e80e46dcca47 it's been introduced a more fine grained description. However 'disabled' might be actually more confusing then empty field, so keep only the info about 'not enabled'aka dmevend is not allowed to monitor LV which otherwise could be monitored. --- lib/metadata/lv.c | 2 +- test/shell/select-report.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c index 1e3fc02d4..ceacfa917 100644 --- a/lib/metadata/lv.c +++ b/lib/metadata/lv.c @@ -313,7 +313,7 @@ char *lvseg_monitor_dup(struct dm_pool *mem, const struct lv_segment *seg) // log_debug("Query LV:%s mon:%s segm:%s tgtm:%p segmon:%d statusm:%d", seg->lv->name, segm->lv->name, segm->segtype->name, segm->segtype->ops->target_monitored, seg_monitored(segm), (int)(segm->status & PVMOVE)); if (!segm->segtype->ops || !segm->segtype->ops->target_monitored) - s = "disabled"; + /* Nothing to do, monitoring not supported */; else if (dmeventd_monitor_mode() != 1) s = "not enabled"; else if (lv_is_cow_covering_origin(seg->lv)) diff --git a/test/shell/select-report.sh b/test/shell/select-report.sh index b717c1031..f08c4edda 100644 --- a/test/shell/select-report.sh +++ b/test/shell/select-report.sh @@ -196,7 +196,7 @@ sel lv 'lv_minor=undef' vol1 vol2 abc orig snap sel lv 'lv_minor=unknown' vol1 vol2 abc orig snap sel lv 'lv_minor=254' xyz # also test synonym for string field type -sel lv 'seg_monitor=undefined' vol1 vol2 abc abc orig snap xyz +sel lv 'seg_monitor=undefined' vol1 vol2 abc abc orig xyz # if size unit not spefied, the 'm' (MiB) unit is used by default sel lv 'lv_size=8' vol1