1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-21 02:50:41 +03:00

Better fix for no-locking udev sync and clvmd

This is better way how to fix clustered synchronization with udev.
As the code for message passing needs fixed - put currently
fs_unlock() after every active/deactive command in clvmd to
ensure nodes are properly created in time.
This commit is contained in:
Zdenek Kabelac 2011-02-02 20:04:39 +00:00
parent 197d68a4d0
commit d4fd789d78
2 changed files with 6 additions and 1 deletions

View File

@ -507,6 +507,7 @@ 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:
@ -520,10 +521,12 @@ int do_lock_lv(unsigned char command, unsigned char lock_flags, char *resource)
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:

View File

@ -38,7 +38,9 @@ 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))
if (!strcmp(resource, VG_SYNC_NAMES) ||
(((flags & LCK_TYPE_MASK) == LCK_UNLOCK) &&
is_real_vg(resource)))
fs_unlock();
break;
case LCK_LV: