summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2011-02-02 13:34:00 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2011-02-02 13:34:00 +0000
commit9dc3afb1fade4b2ed3b35e0499ce86f91d0c075b (patch)
tree325e62f970c59cb075a0ee4a7eac468929f92e8f
parent42715fa1731f72e9cb6ec133dba1f4b11b5360d5 (diff)
downloadlvm2-9dc3afb1fade4b2ed3b35e0499ce86f91d0c075b.tar.gz
lvm2-9dc3afb1fade4b2ed3b35e0499ce86f91d0c075b.tar.xz
lvm2-9dc3afb1fade4b2ed3b35e0499ce86f91d0c075b.zip
Revert wrong fix for nolock locking missing fs_unlock
Patch was wrond and introduced recursive lock_vol Reverting it.
-rw-r--r--daemons/clvmd/clvmd-command.c1
-rw-r--r--lib/locking/file_locking.c1
-rw-r--r--lib/locking/locking.c4
3 files changed, 2 insertions, 4 deletions
diff --git a/daemons/clvmd/clvmd-command.c b/daemons/clvmd/clvmd-command.c
index 6d0dee4a..38727021 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 68b0420b..0c8bbed4 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 c9236104..645f25d5 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. */