summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2012-06-05 11:26:54 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2012-06-15 14:43:07 +0200
commit2f99e5e35a9918c337e66b74aa6126cca9328c64 (patch)
treef0b4dc8688bd22e47caa6d0b82d3483ab0ee1f74 /lib
parent2955f13ecc5cd654b7b332e7d8e03c481ec67ea5 (diff)
downloadlvm2-2f99e5e35a9918c337e66b74aa6126cca9328c64.tar.gz
lvm2-2f99e5e35a9918c337e66b74aa6126cca9328c64.tar.xz
lvm2-2f99e5e35a9918c337e66b74aa6126cca9328c64.zip
Sync filesystem for thin snapshots
Add missing lockfs option when suspend origin, before thin volume snapshot is created
Diffstat (limited to 'lib')
-rw-r--r--lib/activate/activate.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/activate/activate.c b/lib/activate/activate.c
index d2cc5bfb..1f215731 100644
--- a/lib/activate/activate.c
+++ b/lib/activate/activate.c
@@ -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()) {