From: pcaulfield@sourceware.org <pcaulfield@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW daemons/clvmd/clvmd-command.c ...
Date: 11 Dec 2006 14:00:29 -0000 [thread overview]
Message-ID: <20061211140029.28590.qmail@sourceware.org> (raw)
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: pcaulfield at sourceware.org 2006-12-11 14:00:27
Modified files:
. : WHATS_NEW
daemons/clvmd : clvmd-command.c clvmd-gulm.c clvmd-gulm.h
lib/locking : locking.h
Log message:
Fix gulm operation of clvmd. including a hang when attempting to
exclusively lock an LV that is already locked no another node.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.516&r2=1.517
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-command.c.diff?cvsroot=lvm2&r1=1.13&r2=1.14
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-gulm.c.diff?cvsroot=lvm2&r1=1.19&r2=1.20
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-gulm.h.diff?cvsroot=lvm2&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.h.diff?cvsroot=lvm2&r1=1.28&r2=1.29
--- LVM2/WHATS_NEW 2006/12/11 13:48:41 1.516
+++ LVM2/WHATS_NEW 2006/12/11 14:00:26 1.517
@@ -1,5 +1,6 @@
Version 2.02.17 -
===================================
+ Fix gulm operation of clvmd, including a hang when doing lvchange -aey
Fix hang in clvmd if a pre-command failed.
Version 2.02.16 - 1st December 2006
--- LVM2/daemons/clvmd/clvmd-command.c 2006/12/01 23:10:25 1.13
+++ LVM2/daemons/clvmd/clvmd-command.c 2006/12/11 14:00:26 1.14
@@ -194,7 +194,7 @@
/* Read locks need to be PR; other modes get passed through */
if ((lock_cmd & LCK_TYPE_MASK) == LCK_READ) {
lock_cmd &= ~LCK_TYPE_MASK;
- lock_cmd |= LKM_PRMODE;
+ lock_cmd |= LCK_PREAD;
}
status = sync_lock(lockname, (int)lock_cmd, (lock_flags & LCK_NONBLOCK) ? LKF_NOQUEUE : 0, &lkid);
if (status)
--- LVM2/daemons/clvmd/clvmd-gulm.c 2006/10/09 14:11:57 1.19
+++ LVM2/daemons/clvmd/clvmd-gulm.c 2006/12/11 14:00:26 1.20
@@ -730,7 +730,7 @@
pthread_mutex_lock(&lwait.mutex);
/* This needs to be converted from DLM/LVM2 value for GULM */
- if (flags == LCK_NONBLOCK) flags = lg_lock_flag_Try;
+ if (flags & LKF_NOQUEUE) flags = lg_lock_flag_Try;
dm_hash_insert(lock_hash, resource, &lwait);
DEBUGLOG("lock_resource '%s', flags=%d, mode=%d\n", resource, flags, mode);
@@ -828,6 +828,7 @@
}
break;
+ case LCK_PREAD:
case LCK_READ:
status = _lock_resource(lock1, lg_lock_state_Shared, flags, lockid);
if (status)
@@ -864,6 +865,7 @@
/* The held lock mode is in the lock id */
assert(lockid == LCK_EXCL ||
lockid == LCK_READ ||
+ lockid == LCK_PREAD ||
lockid == LCK_WRITE);
status = _unlock_resource(lock1, lockid);
--- LVM2/daemons/clvmd/clvmd-gulm.h 2005/01/13 13:24:02 1.2
+++ LVM2/daemons/clvmd/clvmd-gulm.h 2006/12/11 14:00:26 1.3
@@ -1,5 +1,6 @@
-
+/* DLM constant that clvmd uses as a generic NONBLOCK lock flag */
+#define LKF_NOQUEUE 1
extern int get_next_node_csid(void **context, char *csid);
extern void add_down_node(char *csid);
--- LVM2/lib/locking/locking.h 2006/05/16 16:48:30 1.28
+++ LVM2/lib/locking/locking.h 2006/12/11 14:00:26 1.29
@@ -50,7 +50,7 @@
#define LCK_NULL 0x00000000 /* LCK$_NLMODE */
#define LCK_READ 0x00000001 /* LCK$_CRMODE */
/* LCK$_CWMODE */
- /* LCK$_PRMODE */
+#define LCK_PREAD 0x00000003 /* LCK$_PRMODE */
#define LCK_WRITE 0x00000004 /* LCK$_PWMODE */
#define LCK_EXCL 0x00000005 /* LCK$_EXMODE */
#define LCK_UNLOCK 0x00000006 /* This is ours */
next reply other threads:[~2006-12-11 14:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-11 14:00 pcaulfield [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-04-15 11:36 LVM2 ./WHATS_NEW daemons/clvmd/clvmd-command.c agk
2008-04-15 14:46 mbroz
2008-05-09 15:13 agk
2008-05-09 18:45 agk
2009-04-22 9:39 mbroz
2009-12-09 18:42 mbroz
2010-01-05 16:05 mbroz
2010-01-05 16:07 mbroz
2010-06-04 12:59 mbroz
2010-06-17 12:48 mbroz
2011-01-10 14:02 zkabelac
2011-01-17 23:13 mbroz
2011-01-31 19:52 zkabelac
2011-02-04 19:18 zkabelac
2011-02-18 16:17 zkabelac
2011-04-08 14:40 zkabelac
2011-06-01 21:16 agk
2011-09-26 7:51 zkabelac
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=20061211140029.28590.qmail@sourceware.org \
--to=pcaulfield@sourceware.org \
--cc=lvm-devel@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.