From 09d288535b734ff110a6801bc52053a14169aea7 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 4 Feb 2011 19:21:47 +0000 Subject: [PATCH] Remove extra sync calls. Remove temporaly added fs_unlock() calls to fix clmvd usablity. Now when the message passing is properly working - they are no longer needed. Simplify no_locking check for VG unlock - as message is always send for all targets - clustered & non-clustered. --- daemons/clvmd/lvm-functions.c | 4 ---- lib/locking/no_locking.c | 4 +--- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/daemons/clvmd/lvm-functions.c b/daemons/clvmd/lvm-functions.c index 4039bb2f4..1fa234837 100644 --- a/daemons/clvmd/lvm-functions.c +++ b/daemons/clvmd/lvm-functions.c @@ -507,7 +507,6 @@ int do_lock_lv(unsigned char command, unsigned char lock_flags, char *resource) switch (command & LCK_MASK) { case LCK_LV_EXCLUSIVE: status = do_activate_lv(resource, lock_flags, LCK_EXCL); - fs_unlock(); break; case LCK_LV_SUSPEND: @@ -517,17 +516,14 @@ int do_lock_lv(unsigned char command, unsigned char lock_flags, char *resource) case LCK_UNLOCK: case LCK_LV_RESUME: /* if active */ status = do_resume_lv(resource, lock_flags); - fs_unlock(); break; case LCK_LV_ACTIVATE: status = do_activate_lv(resource, lock_flags, LCK_READ); - fs_unlock(); break; case LCK_LV_DEACTIVATE: status = do_deactivate_lv(resource, lock_flags); - fs_unlock(); break; default: diff --git a/lib/locking/no_locking.c b/lib/locking/no_locking.c index 87c1e0ff6..3ad0d38b2 100644 --- a/lib/locking/no_locking.c +++ b/lib/locking/no_locking.c @@ -38,9 +38,7 @@ static int _no_lock_resource(struct cmd_context *cmd, const char *resource, { switch (flags & LCK_SCOPE_MASK) { case LCK_VG: - if (!strcmp(resource, VG_SYNC_NAMES) || - (((flags & LCK_TYPE_MASK) == LCK_UNLOCK) && - is_real_vg(resource))) + if (!strcmp(resource, VG_SYNC_NAMES)) fs_unlock(); break; case LCK_LV: -- 2.43.5