]> sourceware.org Git - lvm2.git/commitdiff
report: display (h)istorical state in lv_attr field
authorPeter Rajnoha <prajnoha@redhat.com>
Tue, 1 Mar 2016 14:23:58 +0000 (15:23 +0100)
committerPeter Rajnoha <prajnoha@redhat.com>
Thu, 3 Mar 2016 12:49:15 +0000 (13:49 +0100)
The 'historical' state is displayed as 5th bit ("state") in the lv_attr
field and denoted by new 'h' character.

lib/metadata/lv.c

index ab937c4abcf7509add52023852236daaec606b7a..9e9549d0037b0273aadbc8fd53e7a454706bc4f8 100644 (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. */
-       if (!*lv->name)
+       if (!*lv->name && !lv_is_historical(lv))
                goto out;
 
        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' : '-';
 
-       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[5] = 'X';                /* Unknown */
        } else if (lvdm->info.exists) {
This page took 0.040242 seconds and 5 git commands to generate.