From 197d68a4d07da561a758aca61650e6a0e9c1b7d9 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 2 Feb 2011 13:34:00 +0000 Subject: [PATCH] Revert wrong fix for nolock locking missing fs_unlock Patch was wrond and introduced recursive lock_vol Reverting it. --- daemons/clvmd/clvmd-command.c | 1 + lib/locking/file_locking.c | 1 + lib/locking/locking.c | 4 ---- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/daemons/clvmd/clvmd-command.c b/daemons/clvmd/clvmd-command.c index 6d0dee4ad..387270213 100644 --- a/daemons/clvmd/clvmd-command.c +++ b/daemons/clvmd/clvmd-command.c @@ -217,6 +217,7 @@ static int lock_vg(struct local_client *client) if (lkid == 0) return EINVAL; + lvm_do_fs_unlock(); /* Wait for devices */ status = sync_unlock(lockname, lkid); if (status) status = errno; diff --git a/lib/locking/file_locking.c b/lib/locking/file_locking.c index 68b0420b8..0c8bbed4f 100644 --- a/lib/locking/file_locking.c +++ b/lib/locking/file_locking.c @@ -215,6 +215,7 @@ static int _lock_file(const char *file, uint32_t flags) state = 'W'; break; case LCK_UNLOCK: + fs_unlock(); /* Wait until devices are available */ return _release_lock(file, 1); default: log_error("Unrecognised lock type: %d", flags & LCK_TYPE_MASK); diff --git a/lib/locking/locking.c b/lib/locking/locking.c index c92361044..645f25d57 100644 --- a/lib/locking/locking.c +++ b/lib/locking/locking.c @@ -442,10 +442,6 @@ int lock_vol(struct cmd_context *cmd, const char *vol, uint32_t flags) /* If LVM1 driver knows about the VG, it can't be accessed. */ if (!check_lvm1_vg_inactive(cmd, vol)) return_0; - - /* Before unlocking VG wait until devices are available. */ - if ((flags & LCK_TYPE_MASK) == LCK_UNLOCK) - sync_local_dev_names(cmd); break; case LCK_LV: /* All LV locks are non-blocking. */ -- 2.43.5