From 5bfa2ec21d79b090276676076917808207ad4dd1 Mon Sep 17 00:00:00 2001 From: Alasdair G Kergon Date: Wed, 2 Jul 2014 14:57:00 +0100 Subject: [PATCH] report: Exclude hidden devices from lv_path field. --- WHATS_NEW | 1 + lib/metadata/lv.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index dfbb4e31f..c55b3fb87 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.108 - ================================= + Change lv_path field to suppress devices that never appear in /dev/vg. Postpone thin pool lvconvert prompts (2.02.107). Require --yes option to skip prompt to lvconvert thin pool chunksize. Support lvremove -ff to remove thin volumes from broken thin pools. diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c index f1d93a9b5..55395ce7d 100644 --- a/lib/metadata/lv.c +++ b/lib/metadata/lv.c @@ -370,7 +370,8 @@ char *lv_path_dup(struct dm_pool *mem, const struct logical_volume *lv) char *repstr; size_t len; - if (!*lv->vg->name) + /* Only for visible devices that get a link from /dev/vg */ + if (!*lv->vg->name || !lv_is_visible(lv) || lv_is_thin_pool(lv)) return dm_pool_strdup(mem, ""); len = strlen(lv->vg->cmd->dev_dir) + strlen(lv->vg->name) +