summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2012-01-20 22:03:03 +0000
committerMike Snitzer <snitzer@redhat.com>2012-01-20 22:03:03 +0000
commitd658922f3610e5021ca3a9f09ede904c69cac6fd (patch)
tree19faa21d306fd9dc68fec02bdcb8dea2a3ccc9cb
parent23e34c729be7acdab774b2fdf29e125da4c3d392 (diff)
downloadlvm2-d658922f3610e5021ca3a9f09ede904c69cac6fd.tar.gz
lvm2-d658922f3610e5021ca3a9f09ede904c69cac6fd.tar.xz
lvm2-d658922f3610e5021ca3a9f09ede904c69cac6fd.zip
Use m and M lv_attr to indicate that a snapshot merge failed in lvs.
snapshot (m)erge failed, suspended snapshot (M)erge failed
-rw-r--r--WHATS_NEW1
-rw-r--r--lib/metadata/lv.c23
-rw-r--r--man/lvs.8.in1
3 files changed, 17 insertions, 8 deletions
diff --git a/WHATS_NEW b/WHATS_NEW
index 16723bdd..9a27a30d 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
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".
Lookup snapshot usage percent of origin volume when a snapshot is merging.
Update lvdisplay with backward compat. config opt. lvm1_compatible_display.
diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c
index 3fd8a38f..1c72cdee 100644
--- a/lib/metadata/lv.c
+++ b/lib/metadata/lv.c
@@ -441,14 +441,21 @@ char *lv_attr_dup(struct dm_pool *mem, const struct logical_volume *lv)
repstr[4] = 'd'; /* Inactive without table */
/* Snapshot dropped? */
- if (info.live_table && lv_is_cow(lv) &&
- (!lv_snapshot_percent(lv, &snap_percent) ||
- snap_percent == PERCENT_INVALID)) {
- repstr[0] = toupper(repstr[0]);
- if (info.suspended)
- repstr[4] = 'S'; /* Susp Inv snapshot */
- else
- repstr[4] = 'I'; /* Invalid snapshot */
+ if (info.live_table && lv_is_cow(lv)) {
+ if (!lv_snapshot_percent(lv, &snap_percent) ||
+ snap_percent == PERCENT_INVALID) {
+ repstr[0] = toupper(repstr[0]);
+ if (info.suspended)
+ repstr[4] = 'S'; /* Susp Inv snapshot */
+ else
+ 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 */
+ }
}
/*
diff --git a/man/lvs.8.in b/man/lvs.8.in
index 74edd8bd..74e629c7 100644
--- a/man/lvs.8.in
+++ b/man/lvs.8.in
@@ -105,6 +105,7 @@ changes, for example during
fixed (m)inor
.IP 5 3
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
.IP 6 3
device (o)pen