diff options
author | Milan Broz <mbroz@redhat.com> | 2009-12-09 18:28:27 +0000 |
---|---|---|
committer | Milan Broz <mbroz@redhat.com> | 2009-12-09 18:28:27 +0000 |
commit | 7251c8f3a5a9892539be1a462c3339e81030db73 (patch) | |
tree | 4f73da1e5890330b81d52a99c9bd623d0d355f42 /lib/locking | |
parent | f9f8cd08b3fdf62736eb6f081178b6fe0de68707 (diff) | |
download | lvm2-7251c8f3a5a9892539be1a462c3339e81030db73.tar.gz lvm2-7251c8f3a5a9892539be1a462c3339e81030db73.tar.xz lvm2-7251c8f3a5a9892539be1a462c3339e81030db73.zip |
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.)
Diffstat (limited to 'lib/locking')
-rw-r--r-- | lib/locking/cluster_locking.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/locking/cluster_locking.c b/lib/locking/cluster_locking.c index b031f12c..d3138f22 100644 --- a/lib/locking/cluster_locking.c +++ b/lib/locking/cluster_locking.c @@ -317,8 +317,9 @@ static int _lock_for_cluster(struct cmd_context *cmd, unsigned char clvmd_cmd, 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; |