1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

lvs: add partial attribute

This commit is contained in:
Alasdair G Kergon 2012-09-19 12:49:40 +01:00
parent b737ff01e4
commit 290ae4791e
3 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.98 -
=================================
Add (p)artial attribute to lvs.
Don't try to issue discards to a missing PV to avoid segfault.
Prevent lvremove from removing LVs that have any part missing.
Clear LV_NOSYNCED flag when a RAID1 LV is converted to a linear LV.

View File

@ -377,7 +377,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, 9))) {
if (!(repstr = dm_pool_zalloc(mem, 10))) {
log_error("dm_pool_alloc failed");
return 0;
}
@ -496,6 +496,11 @@ char *lv_attr_dup(struct dm_pool *mem, const struct logical_volume *lv)
else
repstr[7] = '-';
if (lv->status & PARTIAL_LV)
repstr[8] = 'p';
else
repstr[8] = '-';
out:
return repstr;
}

View File

@ -157,6 +157,9 @@ Snapshots using the original device-mapper driver appear as (s); whereas
snapshots of thin volumes using the new thin provisioning driver appear as (t).
.IP 8 3
Newly-allocated data blocks are overwritten with blocks of (z)eroes before use.
.IP 9 3
(p)artial: One or more of the Physical Volumes this Logical Volume uses is
missing from the system.
.RE
.TP
.BR \-O ", " \-\-sort