summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2012-01-20 10:55:28 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2012-01-20 10:55:28 +0000
commitf881095a69283ecf248562b5c97fbc7c1bbda6f9 (patch)
tree007c87ea4505d03498df630ec787e82881c166ce
parent43254b118569c12bdf614f7822907b49aa0713b6 (diff)
downloadlvm2-f881095a69283ecf248562b5c97fbc7c1bbda6f9.tar.gz
lvm2-f881095a69283ecf248562b5c97fbc7c1bbda6f9.tar.xz
lvm2-f881095a69283ecf248562b5c97fbc7c1bbda6f9.zip
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*.
-rw-r--r--WHATS_NEW1
-rw-r--r--lib/metadata/lv.c4
2 files changed, 1 insertions, 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));
}