LVM2/lib/locking cluster_locking.c
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz at sourceware.org 2009-12-09 18:28:27
Modified files:
lib/locking : cluster_locking.c
Log message:
Get rid of magic masks in cluster locking code.
Patch should not cause any problems, only real change is removing LCK_LOCAL bit from lock type flag, it is never used there. (LCK_LOCAL is part arg[1] bits anyway.)
lib/locking/cluster_locking.c +3 -2
@@ -317,8 +317,9 @@ args =alloca (len);strcpy (args +2 , name); - args[0 ] = flags &0x7F ;/* Maskoff lock flags */ - args[1 ] = flags &0xC0 ;/* Bitmap flags */ +/* Maskoff lock flags */ + args[0 ] = flags & (LCK_SCOPE_MASK |LCK_TYPE_MASK |LCK_NONBLOCK |LCK_HOLD ); + args[1 ] = flags & (LCK_LOCAL |LCK_CLUSTER_VG );if (mirror_in_sync ()) args[1 ] |=LCK_MIRROR_NOSYNC_MODE ;