1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Fix locking in clvmd

The changes to remove LCK_NONBLOCK from the LVM locks broke clvmd because the
code was clearly wrong but working anyway! The constant was being masked rather
than the variable that was supposed to match against it.
This commit is contained in:
Christine Caulfield 2009-08-05 14:18:35 +00:00
parent 4d4d7c1fb3
commit cecc0e9dc8
2 changed files with 7 additions and 6 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.51 -
================================
Fix locking in clvmd (2.02.50).
Add --noudevsync option for relevant LVM tools.
Add activation/udev_sync to lvm.conf.
Only change LV symlinks on ACTIVATE not PRELOAD.

View File

@ -479,29 +479,29 @@ int do_lock_lv(unsigned char command, unsigned char lock_flags, char *resource)
cmd->partial_activation = (lock_flags & LCK_PARTIAL_MODE) ? 1 : 0;
switch (command) {
case LCK_LV_EXCLUSIVE & LCK_MASK:
switch (command & LCK_MASK) {
case LCK_LV_EXCLUSIVE:
status = do_activate_lv(resource, lock_flags, LKM_EXMODE);
break;
case LCK_LV_SUSPEND & LCK_MASK:
case LCK_LV_SUSPEND:
status = do_suspend_lv(resource);
if (!status)
suspended++;
break;
case LCK_UNLOCK:
case LCK_LV_RESUME & LCK_MASK: /* if active */
case LCK_LV_RESUME: /* if active */
status = do_resume_lv(resource);
if (!status)
suspended--;
break;
case LCK_LV_ACTIVATE & LCK_MASK:
case LCK_LV_ACTIVATE:
status = do_activate_lv(resource, lock_flags, LKM_CRMODE);
break;
case LCK_LV_DEACTIVATE & LCK_MASK:
case LCK_LV_DEACTIVATE:
status = do_deactivate_lv(resource, lock_flags);
break;