Skip to contentSkip to conversation

LVM2 ./WHATS_NEW lib/metadata/lv.c

PATCH [email protected] 1 participant 1 message Jan 20, 2012

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2012-01-20 10:55:28

Modified files:
. : WHATS_NEW
lib/metadata : lv.c

Log message:
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*.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2226&r2=1.2227
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv.c.diff?cvsroot=lvm2&r1=1.32&r2=1.33

WHATS_NEW +1 -0
@@ -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.
lib/metadata/lv.c +0 -4
@@ -116,10 +116,6 @@
 
 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));
 }