1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-17 06:04:23 +03:00

Use m and M lv_attr to indicate that a snapshot merge failed in lvs.

snapshot (m)erge failed, suspended snapshot (M)erge failed
This commit is contained in:
Mike Snitzer 2012-01-20 22:03:03 +00:00
parent 23e34c729b
commit d658922f36
3 changed files with 17 additions and 8 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.89 - Version 2.02.89 -
================================== ==================================
Use m and M lv_attr to indicate that a snapshot merge failed in lvs.
Differentiate between snapshot status of "Invalid" and "Merge failed". Differentiate between snapshot status of "Invalid" and "Merge failed".
Lookup snapshot usage percent of origin volume when a snapshot is merging. Lookup snapshot usage percent of origin volume when a snapshot is merging.
Update lvdisplay with backward compat. config opt. lvm1_compatible_display. Update lvdisplay with backward compat. config opt. lvm1_compatible_display.

View File

@ -441,14 +441,21 @@ char *lv_attr_dup(struct dm_pool *mem, const struct logical_volume *lv)
repstr[4] = 'd'; /* Inactive without table */ repstr[4] = 'd'; /* Inactive without table */
/* Snapshot dropped? */ /* Snapshot dropped? */
if (info.live_table && lv_is_cow(lv) && if (info.live_table && lv_is_cow(lv)) {
(!lv_snapshot_percent(lv, &snap_percent) || if (!lv_snapshot_percent(lv, &snap_percent) ||
snap_percent == PERCENT_INVALID)) { snap_percent == PERCENT_INVALID) {
repstr[0] = toupper(repstr[0]); repstr[0] = toupper(repstr[0]);
if (info.suspended) if (info.suspended)
repstr[4] = 'S'; /* Susp Inv snapshot */ repstr[4] = 'S'; /* Susp Inv snapshot */
else else
repstr[4] = 'I'; /* Invalid snapshot */ repstr[4] = 'I'; /* Invalid snapshot */
}
else if (snap_percent == PERCENT_MERGE_FAILED) {
if (info.suspended)
repstr[4] = 'M'; /* Susp snapshot merge failed */
else
repstr[4] = 'm'; /* snapshot merge failed */
}
} }
/* /*

View File

@ -105,6 +105,7 @@ changes, for example during
fixed (m)inor fixed (m)inor
.IP 5 3 .IP 5 3
State: (a)ctive, (s)uspended, (I)nvalid snapshot, invalid (S)uspended snapshot, State: (a)ctive, (s)uspended, (I)nvalid snapshot, invalid (S)uspended snapshot,
snapshot (m)erge failed, suspended snapshot (M)erge failed,
mapped (d)evice present without tables, mapped device present with (i)nactive table mapped (d)evice present without tables, mapped device present with (i)nactive table
.IP 6 3 .IP 6 3
device (o)pen device (o)pen