master - display: show C only for cache and cachepool
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4db5d78cefa99c053ba1f0bf73aa0eb55cafb279 Commit: 4db5d78cefa99c053ba1f0bf73aa0eb55cafb279 Parent: ba048612a3dcb9ca35c54f05a006ec458da4164f Author: Zdenek Kabelac <[email protected]> AuthorDate: Mon Jul 7 22:26:56 2014 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Fri Jul 11 12:50:44 2014 +0200
display: show C only for cache and cachepool
Keep target type (attr6) as the cache data and metadata volume has. (i.e. when will show 'raid' type if metadata is raid)
--- WHATS_NEW | 1 + lib/metadata/lv.c | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.108 - ================================= + Display 'C' only for cache and cache-pool target types in lvs. Prompt for confirmation before change LV into a snapshot exception store. Return proper error codes for some failing lvconvert funtions. Add initial code to use cache tools (cache_check|dump|repair|restore).
lib/metadata/lv.c +4 -6
@@ -640,14 +640,12 @@ 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_cache_pool_metadata(lv)) + else if (lv_is_pool_metadata(lv) || + lv_is_pool_metadata_spare(lv) || +lv_is_raid_metadata (lv)) repstr[0 ] ='e' ; else if (lv_is_cache_type(lv)) repstr[0 ] ='C' ; - else if (lv_is_thin_pool_metadata(lv) || - lv_is_pool_metadata_spare(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)
@@ -739,7 +737,7 @@ char *lv_attr_dup(struct dm_pool *mem, const struct logical_volume *lv)if (lv_is_thin_pool (lv) ||lv_is_thin_volume (lv)) repstr[6 ] ='t' ; -else if (lv_is_cache_type (lv)) +else if (lv_is_cache_pool (lv) ||lv_is_cache (lv)) repstr[6 ] ='C' ;else if (lv_is_raid_type (lv)) repstr[6 ] ='r' ;