1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +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 56aba8dc9d
commit ee1e49ec53
2 changed files with 7 additions and 6 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.51 - Version 2.02.51 -
================================ ================================
Fix locking in clvmd (2.02.50).
Add --noudevsync option for relevant LVM tools. Add --noudevsync option for relevant LVM tools.
Add activation/udev_sync to lvm.conf. Add activation/udev_sync to lvm.conf.
Only change LV symlinks on ACTIVATE not PRELOAD. 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; cmd->partial_activation = (lock_flags & LCK_PARTIAL_MODE) ? 1 : 0;
switch (command) { switch (command & LCK_MASK) {
case LCK_LV_EXCLUSIVE & LCK_MASK: case LCK_LV_EXCLUSIVE:
status = do_activate_lv(resource, lock_flags, LKM_EXMODE); status = do_activate_lv(resource, lock_flags, LKM_EXMODE);
break; break;
case LCK_LV_SUSPEND & LCK_MASK: case LCK_LV_SUSPEND:
status = do_suspend_lv(resource); status = do_suspend_lv(resource);
if (!status) if (!status)
suspended++; suspended++;
break; break;
case LCK_UNLOCK: case LCK_UNLOCK:
case LCK_LV_RESUME & LCK_MASK: /* if active */ case LCK_LV_RESUME: /* if active */
status = do_resume_lv(resource); status = do_resume_lv(resource);
if (!status) if (!status)
suspended--; suspended--;
break; break;
case LCK_LV_ACTIVATE & LCK_MASK: case LCK_LV_ACTIVATE:
status = do_activate_lv(resource, lock_flags, LKM_CRMODE); status = do_activate_lv(resource, lock_flags, LKM_CRMODE);
break; break;
case LCK_LV_DEACTIVATE & LCK_MASK: case LCK_LV_DEACTIVATE:
status = do_deactivate_lv(resource, lock_flags); status = do_deactivate_lv(resource, lock_flags);
break; break;