2014-09-25 10:31:10 +02:00
|
|
|
---
|
|
|
|
daemons/clvmd/lvm-functions.c | 11 +++++++----
|
|
|
|
1 file changed, 7 insertions(+), 4 deletions(-)
|
|
|
|
|
|
|
|
--- a/daemons/clvmd/lvm-functions.c
|
|
|
|
+++ b/daemons/clvmd/lvm-functions.c
|
|
|
|
@@ -416,16 +416,18 @@ error:
|
|
|
|
/* Resume the LV if it was active */
|
|
|
|
static int do_resume_lv(char *resource, unsigned char command, unsigned char lock_flags)
|
|
|
|
{
|
|
|
|
- int oldmode, origin_only, exclusive, revert;
|
|
|
|
+ int oldmode, origin_only, exclusive = 0, revert;
|
2014-03-28 15:57:40 +01:00
|
|
|
|
2014-09-25 10:31:10 +02:00
|
|
|
+#if 0
|
2014-03-28 15:57:40 +01:00
|
|
|
/* Is it open ? */
|
|
|
|
oldmode = get_current_lock(resource);
|
|
|
|
if (oldmode == -1 && (command & LCK_CLUSTER_VG)) {
|
|
|
|
DEBUGLOG("do_resume_lv, lock not already held\n");
|
2014-09-25 10:31:10 +02:00
|
|
|
return 0; /* We don't need to do anything */
|
2014-03-28 15:57:40 +01:00
|
|
|
}
|
2014-09-25 10:31:10 +02:00
|
|
|
- origin_only = (lock_flags & LCK_ORIGIN_ONLY_MODE) ? 1 : 0;
|
2014-03-28 15:57:40 +01:00
|
|
|
exclusive = (oldmode == LCK_EXCL) ? 1 : 0;
|
2014-09-25 10:31:10 +02:00
|
|
|
+#endif
|
|
|
|
+ origin_only = (lock_flags & LCK_ORIGIN_ONLY_MODE) ? 1 : 0;
|
2014-03-28 15:57:40 +01:00
|
|
|
revert = (lock_flags & LCK_REVERT_MODE) ? 1 : 0;
|
|
|
|
|
2014-09-25 10:31:10 +02:00
|
|
|
if (!lv_resume_if_active(cmd, resource, origin_only, exclusive, revert, NULL))
|
|
|
|
@@ -439,16 +441,17 @@ static int do_suspend_lv(char *resource,
|
|
|
|
{
|
|
|
|
int oldmode;
|
|
|
|
unsigned origin_only = (lock_flags & LCK_ORIGIN_ONLY_MODE) ? 1 : 0;
|
|
|
|
- unsigned exclusive;
|
|
|
|
+ unsigned exclusive = 0;
|
|
|
|
|
|
|
|
+#if 0
|
2014-03-28 15:57:40 +01:00
|
|
|
/* Is it open ? */
|
|
|
|
oldmode = get_current_lock(resource);
|
|
|
|
if (oldmode == -1 && (command & LCK_CLUSTER_VG)) {
|
|
|
|
DEBUGLOG("do_suspend_lv, lock not already held\n");
|
2014-09-25 10:31:10 +02:00
|
|
|
return 0; /* Not active, so it's OK */
|
2014-03-28 15:57:40 +01:00
|
|
|
}
|
2014-09-25 10:31:10 +02:00
|
|
|
-
|
2014-03-28 15:57:40 +01:00
|
|
|
exclusive = (oldmode == LCK_EXCL) ? 1 : 0;
|
2014-09-25 10:31:10 +02:00
|
|
|
+#endif
|
2014-03-28 15:57:40 +01:00
|
|
|
|
2014-09-25 10:31:10 +02:00
|
|
|
/* Always call lv_suspend to read commited and precommited data */
|
|
|
|
if (!lv_suspend_if_active(cmd, resource, origin_only, exclusive, NULL, NULL))
|