]> sourceware.org Git - lvm2.git/commitdiff
report: report merged state for inactive LV
authorZdenek Kabelac <zkabelac@redhat.com>
Thu, 5 Jan 2017 14:52:00 +0000 (15:52 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Thu, 5 Jan 2017 14:54:14 +0000 (15:54 +0100)
This was missing piece in 77997c7673bfca56f51ae4eb55a50bc76e40fe79.
When merging origin is inactive (while driver is loaded) we
could already report merge in progress values as there is
no way to activate 'old state' now.

tools/reporter.c

index 6c5996b1f24665cc4399f83a3e31ff21cd01e20f..e70fa29606c13e1477840a7b59f1c183c607f287 100644 (file)
@@ -136,11 +136,14 @@ static int _check_merging_origin(const struct logical_volume *lv,
        case SEG_STATUS_SNAPSHOT:
                break;
        default:
+               /* When inactive, it's technically merging */
+               if (status->info_ok && !status->info.exists)
+                       break;
                return 1;
        }
 
        /* Origin is gone */
-       log_debug_activation("Merge is progress, reporting merged LV %s.",
+       log_debug_activation("Merge is in progress, reporting merged LV %s.",
                             display_lvname(lv->snapshot->lv));
        *merged = 1;
 
This page took 0.102914 seconds and 5 git commands to generate.