summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2015-10-09 21:41:50 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2015-10-13 15:15:44 +0200
commite261af52eb26c22aebd62cdbd8bb79c195274ee9 (patch)
treed6e386c3650b6c3e9662f11548799efa9f9a7be8
parent3f03d46fc13be2274b3c29d4fc97a3306bc33eda (diff)
downloadlvm2-e261af52eb26c22aebd62cdbd8bb79c195274ee9.tar.gz
dmeventd: handle snapshot overflow
When snapshot reports overflow, handle it in the same way as Invalid. Until better ideas are implemented.
-rw-r--r--WHATS_NEW_DM1
-rw-r--r--daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index ff4ac2286..efe8b371a 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.110 -
======================================
+ Dmeventd handles snapshot overflow for now equally as invalid.
Convert dmeventd to use common logging macro system from libdm.
Return -ENOMEM when device registration fails instead of 0 (=success).
Enforce writethrough mode for cleaner policy.
diff --git a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
index ffe6666fe..ae8e308db 100644
--- a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
+++ b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
@@ -150,7 +150,7 @@ void process_event(struct dm_task *dmt,
if (!dm_get_status_snapshot(state->mem, params, &status))
goto out;
- if (status->invalid) {
+ if (status->invalid || status->overflow) {
struct dm_info info;
log_error("Snapshot %s is lost.", device);
if (dm_task_get_info(dmt, &info)) {
@@ -170,7 +170,7 @@ void process_event(struct dm_task *dmt,
* If the snapshot has been invalidated or we failed to parse
* the status string. Report the full status string to syslog.
*/
- if (status->invalid || !status->total_sectors) {
+ if (status->invalid || status->overflow || !status->total_sectors) {
log_error("Snapshot %s changed state to: %s.", device, params);
state->percent_check = 0;
goto out;