1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

report: display (h)istorical state in lv_attr field

The 'historical' state is displayed as 5th bit ("state") in the lv_attr
field and denoted by new 'h' character.
This commit is contained in:
Peter Rajnoha 2016-03-01 15:23:58 +01:00
parent 2af5971523
commit 8b9953e8c5

View File

@ -1040,7 +1040,7 @@ char *lv_attr_dup_with_info_and_seg_status(struct dm_pool *mem, const struct lv_
} }
/* Blank if this is a "free space" LV. */ /* Blank if this is a "free space" LV. */
if (!*lv->name) if (!*lv->name && !lv_is_historical(lv))
goto out; goto out;
if (lv_is_pvmove(lv)) if (lv_is_pvmove(lv))
@ -1104,7 +1104,10 @@ char *lv_attr_dup_with_info_and_seg_status(struct dm_pool *mem, const struct lv_
repstr[3] = (lv->status & FIXED_MINOR) ? 'm' : '-'; repstr[3] = (lv->status & FIXED_MINOR) ? 'm' : '-';
if (!activation() || !lvdm->info_ok) { if (lv_is_historical(lv)) {
repstr[4] = 'h';
repstr[5] = '-';
} else if (!activation() || !lvdm->info_ok) {
repstr[4] = 'X'; /* Unknown */ repstr[4] = 'X'; /* Unknown */
repstr[5] = 'X'; /* Unknown */ repstr[5] = 'X'; /* Unknown */
} else if (lvdm->info.exists) { } else if (lvdm->info.exists) {