]> sourceware.org Git - lvm2.git/commitdiff
Sync filesystem for thin snapshots
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 5 Jun 2012 09:26:54 +0000 (11:26 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 15 Jun 2012 12:43:07 +0000 (14:43 +0200)
Add missing lockfs option when suspend origin, before thin volume
snapshot is created

WHATS_NEW
lib/activate/activate.c

index 91286077a5162966d97d388bbe4f6883728d1671..0158c6c6e734ffd368c925c7798e2b96c3f0a603 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.97 - 
 ===============================
+  Fix missing sync of filesystem when creating thin volume snapshot.
 
 Version 2.02.96 - 8th June 2012
 ===============================
index d2cc5bfb9ecc32dcd1da76502567c95133d6ad4f..1f2157318a3dc7a676222e936fb65fc77a283699 100644 (file)
@@ -1518,6 +1518,9 @@ static int _lv_suspend(struct cmd_context *cmd, const char *lvid_s,
            (lv_is_origin(lv_pre) || lv_is_cow(lv_pre)))
                lockfs = 1;
 
+       if (laopts->origin_only && lv_is_thin_volume(lv) && lv_is_thin_volume(lv_pre))
+               lockfs = 1;
+
        /*
         * Suspending an LV directly above a PVMOVE LV also
         * suspends other LVs using that same PVMOVE LV.
@@ -1597,7 +1600,7 @@ static int _lv_resume(struct cmd_context *cmd, const char *lvid_s,
        if (lv_is_thin_pool(lv) && laopts->origin_only)
                messages_only = 1;
 
-       if (!lv_is_origin(lv))
+       if (!lv_is_origin(lv) && !lv_is_thin_volume(lv))
                laopts->origin_only = 0;
 
        if (test_mode()) {
This page took 0.038941 seconds and 5 git commands to generate.