master - thin: report 'e' metadata type with higher priority
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=01ef97fcbbfe0ed49b3dc61765d166efe8647e8a Commit: 01ef97fcbbfe0ed49b3dc61765d166efe8647e8a Parent: c0290489c33be7d8318e3005dffcebc62a6f3354 Author: Zdenek Kabelac <[email protected]> AuthorDate: Wed Jun 5 13:46:38 2013 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Tue Jun 11 14:03:08 2013 +0200
thin: report 'e' metadata type with higher priority
Giving volume type information about being 'metadata' type of volume has higher priority then i.e. 'mirror' or 'thin' flag - for those type we have 'target attr' (7th. field).
--- WHATS_NEW | 1 + lib/metadata/lv.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.99 - =================================== + Report lvs volume type 'e' with higher priority. Report lvs volume type 'o' also for external origin volumes. Report lvs target type 't' only for thin pools and thin volumes. Fix test for active snapshot in cluster before resizing it.
lib/metadata/lv.c +3 -2
@@ -536,6 +536,9 @@ char *lv_attr_dup(struct dm_pool *mem, const struct logical_volume *lv)/* Origin takes precedence over mirror and thin volume */ else if (lv_is_origin(lv) || lv_is_external_origin(lv)) repstr[0 ] = (lv_is_merging_origin (lv)) ?'O' :'o' ; + else if (lv_is_thin_pool_metadata(lv) || + (lv->status & RAID_META)) + repstr[0 ] ='e' ; else if (lv->status & RAID) repstr[0 ] = (lv->status &LV_NOTSYNCED ) ?'R' :'r' ; else if (lv->status & MIRRORED)
@@ -548,8 +551,6 @@ char *lv_attr_dup(struct dm_pool *mem, const struct logical_volume *lv) repstr[0 ] ='t' ; else if (lv_is_thin_pool_data(lv)) repstr[0 ] ='T' ; - else if (lv_is_thin_pool_metadata(lv) || (lv->status & RAID_META)) - repstr[0 ] ='e' ; else if (lv->status & MIRROR_IMAGE) repstr[0 ] = (_lv_mimage_in_sync (lv)) ?'i' :'I' ; else if (lv->status & RAID_IMAGE)