public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: jbrassow@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2/lib/locking cluster_locking.c
Date: Tue, 01 Feb 2011 17:31:00 -0000	[thread overview]
Message-ID: <20110201173140.2138.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	jbrassow@sourceware.org	2011-02-01 17:31:40

Modified files:
	lib/locking    : cluster_locking.c 

Log message:
	fix bad 'strcmp's in 'decode_lock_type' - missing !'s
	
	There was no effect from having this wrong yet, because the
	tree of callers only ever cared about the answer to the first
	condition (!response), which determines whether a lock is
	held or not.  Correct responses, however, are needed soon.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/cluster_locking.c.diff?cvsroot=lvm2&r1=1.50&r2=1.51

--- LVM2/lib/locking/cluster_locking.c	2011/01/28 10:16:04	1.50
+++ LVM2/lib/locking/cluster_locking.c	2011/02/01 17:31:40	1.51
@@ -490,11 +490,11 @@
 {
 	if (!response)
 		return LCK_NULL;
-	else if (strcmp(response, "EX"))
+	else if (!strcmp(response, "EX"))
 		return LCK_EXCL;
-	else if (strcmp(response, "CR"))
+	else if (!strcmp(response, "CR"))
 		return LCK_READ;
-	else if (strcmp(response, "PR"))
+	else if (!strcmp(response, "PR"))
 		return LCK_PREAD;
 
 	stack;
@@ -532,8 +532,8 @@
 
 		/*
 		 * All nodes should use CR, or exactly one node
-		 * should held EX. (PR is obsolete)
-		 * If two nodes node reports different locks,
+		 * should hold EX. (PR is obsolete)
+		 * If two nodes report different locks,
 		 * something is broken - just return more important mode.
 		 */
 		if (decode_lock_type(response[i].response) > *mode)


             reply	other threads:[~2011-02-01 17:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-01 17:31 jbrassow [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-12-08 18:19 agk
2011-11-30 17:02 mornfall
2011-02-02 23:57 agk
2010-11-29 11:13 zkabelac
2009-12-09 18:28 mbroz
2009-12-09 18:16 mbroz
2008-12-16 12:30 wysochanski
2006-05-12 13:33 agk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110201173140.2138.qmail@sourceware.org \
    --to=jbrassow@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).