1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-04-01 18:50:41 +03:00

lvs: add 's(k)ip activatoin' lv_attr field

A new 10-th bit in lvs lv_attr field to indicate whether an LV
has the ACTIVATION_SKIP flag attached (stored in metadata).
This commit is contained in:
Peter Rajnoha 2013-07-11 14:05:05 +02:00
parent ab789c1bcf
commit 283c93a858
2 changed files with 8 additions and 1 deletions

View File

@ -530,7 +530,7 @@ char *lv_attr_dup(struct dm_pool *mem, const struct logical_volume *lv)
struct lv_segment *seg;
char *repstr;
if (!(repstr = dm_pool_zalloc(mem, 10))) {
if (!(repstr = dm_pool_zalloc(mem, 11))) {
log_error("dm_pool_alloc failed");
return 0;
}
@ -664,6 +664,11 @@ char *lv_attr_dup(struct dm_pool *mem, const struct logical_volume *lv)
repstr[8] = 'w'; /* sub-LV has 'w'ritemostly */
}
if (lv->status & LV_ACTIVATION_SKIP)
repstr[9] = 'k';
else
repstr[9] = '-';
out:
return repstr;
}

View File

@ -176,6 +176,8 @@ of a RAID logical volume will clear this flag if no additional discrepancies
are found. ("check" and "repair" of a RAID Logical Volume can be done via
the 'lvchange' command.) (w)ritemostly signifies the devices in a RAID 1
logical volume that have been marked write-mostly.
.IP 10 3
(n)o activation: this volume is flagged to be skipped during activation.
.RE
.TP
.BR \-O ", " \-\-sort