From f881095a69283ecf248562b5c97fbc7c1bbda6f9 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 20 Jan 2012 10:55:28 +0000 Subject: Drop hack in segtype reporting Since striped name function knows when to report 'linear' instead of 'stripe' type name - drop it from this place. This fixes problem when reporting segtype e.g. for thin-pool which is also using area_count=1 to store thin data device reference. It also returns properly strduped memory instead of badly casted const char*. --- WHATS_NEW | 1 + lib/metadata/lv.c | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 5a8cccf9..80c57803 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.89 - ================================== + Do not report linear segtype for non-striped targets. Keep info about creation host and time for each logical volume. Make error message hit when preallocated memlock memory exceeded clearer. Use R lv_attr to indicate read-only activation of non-read-only device in lvs. diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c index b2176f2a..302fd4a1 100644 --- a/lib/metadata/lv.c +++ b/lib/metadata/lv.c @@ -116,10 +116,6 @@ char *lvseg_tags_dup(const struct lv_segment *seg) char *lvseg_segtype_dup(struct dm_pool *mem, const struct lv_segment *seg) { - if (seg->area_count == 1) { - return (char *)"linear"; - } - return dm_pool_strdup(mem, seg->segtype->ops->name(seg)); } -- cgit