1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

dmeventd: handle snapshot overflow

When snapshot reports overflow, handle it in the same way as Invalid.
Until better ideas are implemented.
This commit is contained in:
Zdenek Kabelac 2015-10-09 21:41:50 +02:00
parent 3f03d46fc1
commit e261af52eb
2 changed files with 3 additions and 2 deletions

View File

@ -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.

View File

@ -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;