public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/lib/locking locking.h
@ 2011-12-03 11:36 mbroz
  0 siblings, 0 replies; 10+ messages in thread
From: mbroz @ 2011-12-03 11:36 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mbroz@sourceware.org	2011-12-03 11:36:10

Modified files:
	lib/locking    : locking.h 

Log message:
	Fix FIXME and comment :-)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.h.diff?cvsroot=lvm2&r1=1.71&r2=1.72

--- LVM2/lib/locking/locking.h	2011/12/03 11:34:35	1.71
+++ LVM2/lib/locking/locking.h	2011/12/03 11:36:10	1.72
@@ -94,7 +94,7 @@
 #define LCK_NONBLOCK	0x00000010U	/* Don't block waiting for lock? */
 #define LCK_HOLD	0x00000020U	/* Hold lock when lock_vol returns? */
 #define LCK_LOCAL	0x00000040U	/* Don't propagate to other nodes */
-// FIXME: not used in lock bit byte
+// FIXME: not used in lock bits
 //#define LCK_CLUSTER_VG	0x00000080U	/* VG is clustered */
 #define LCK_CACHE	0x00000100U	/* Operation on cache only using P_ lock */
 #define LCK_ORIGIN_ONLY	0x00000200U	/* Operation should bypass any snapshots */
@@ -111,7 +111,7 @@
 #define LCK_ORIGIN_ONLY_MODE		0x20	/* Same as above */
 #define LCK_DMEVENTD_MONITOR_IGNORE     0x40	/* Whether to ignore dmeventd */
 
-// FIXME: conlict here (CLUSTER_VG is used in lock bits byte)
+// FIXME: conflict here (CLUSTER_VG is used here)
 #define LCK_REVERT_MODE			0x80	/* Remove inactive tables */
 #define LCK_CLUSTER_VG			0x80	/* VG is clustered */
 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* LVM2/lib/locking locking.h
@ 2012-04-24 12:17 zkabelac
  0 siblings, 0 replies; 10+ messages in thread
From: zkabelac @ 2012-04-24 12:17 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-04-24 12:17:13

Modified files:
	lib/locking    : locking.h 

Log message:
	Add some lock comments

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.h.diff?cvsroot=lvm2&r1=1.75&r2=1.76

--- LVM2/lib/locking/locking.h	2012/02/27 09:52:37	1.75
+++ LVM2/lib/locking/locking.h	2012/04/24 12:17:12	1.76
@@ -67,13 +67,13 @@
  */
 #define LCK_TYPE_MASK	0x00000007U
 
-#define LCK_NULL	0x00000000U	/* LCK$_NLMODE */
-#define LCK_READ	0x00000001U	/* LCK$_CRMODE */
+#define LCK_NULL	0x00000000U	/* LCK$_NLMODE (Deactivate) */
+#define LCK_READ	0x00000001U	/* LCK$_CRMODE (Activate) */
 					/* LCK$_CWMODE */
 #define LCK_PREAD       0x00000003U	/* LCK$_PRMODE */
-#define LCK_WRITE	0x00000004U	/* LCK$_PWMODE */
-#define LCK_EXCL	0x00000005U	/* LCK$_EXMODE */
-#define LCK_UNLOCK      0x00000006U	/* This is ours */
+#define LCK_WRITE	0x00000004U	/* LCK$_PWMODE (Suspend) */
+#define LCK_EXCL	0x00000005U	/* LCK$_EXMODE (Exclusive) */
+#define LCK_UNLOCK      0x00000006U	/* This is ours (Resume) */
 
 /*
  * Lock flags - these numbers are the same as DLM


^ permalink raw reply	[flat|nested] 10+ messages in thread

* LVM2/lib/locking locking.h
@ 2012-02-27  9:54 zkabelac
  0 siblings, 0 replies; 10+ messages in thread
From: zkabelac @ 2012-02-27  9:54 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-02-27 09:52:37

Modified files:
	lib/locking    : locking.h 

Log message:
	Ignore result of unlock explicitely

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.h.diff?cvsroot=lvm2&r1=1.74&r2=1.75

--- LVM2/lib/locking/locking.h	2012/01/21 05:29:52	1.74
+++ LVM2/lib/locking/locking.h	2012/02/27 09:52:37	1.75
@@ -163,7 +163,7 @@
 	do { \
 		if (is_real_vg(vol)) \
 			sync_dev_names(cmd); \
-		lock_vol(cmd, vol, LCK_VG_UNLOCK); \
+		(void) lock_vol(cmd, vol, LCK_VG_UNLOCK); \
 	} while (0)
 #define unlock_and_release_vg(cmd, vg, vol) \
 	do { \


^ permalink raw reply	[flat|nested] 10+ messages in thread

* LVM2/lib/locking locking.h
@ 2011-12-08 18:09 agk
  0 siblings, 0 replies; 10+ messages in thread
From: agk @ 2011-12-08 18:09 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2011-12-08 18:09:48

Modified files:
	lib/locking    : locking.h 

Log message:
	Update comments.  CLUSTER_VG belongs firmly to args[0].

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.h.diff?cvsroot=lvm2&r1=1.72&r2=1.73

--- LVM2/lib/locking/locking.h	2011/12/03 11:36:10	1.72
+++ LVM2/lib/locking/locking.h	2011/12/08 18:09:48	1.73
@@ -89,13 +89,14 @@
 #define LCK_LV		0x00000008U
 
 /*
- * Lock bits
+ * Lock bits.
+ * Bottom 8 bits except LCK_LOCAL form args[0] in cluster comms.
  */
 #define LCK_NONBLOCK	0x00000010U	/* Don't block waiting for lock? */
 #define LCK_HOLD	0x00000020U	/* Hold lock when lock_vol returns? */
+#define LCK_CLUSTER_VG	0x00000080U	/* VG is clustered */
+
 #define LCK_LOCAL	0x00000040U	/* Don't propagate to other nodes */
-// FIXME: not used in lock bits
-//#define LCK_CLUSTER_VG	0x00000080U	/* VG is clustered */
 #define LCK_CACHE	0x00000100U	/* Operation on cache only using P_ lock */
 #define LCK_ORIGIN_ONLY	0x00000200U	/* Operation should bypass any snapshots */
 #define LCK_REVERT	0x00000400U	/* Revert any incomplete change */
@@ -106,14 +107,14 @@
 #define LCK_PARTIAL_MODE        	0x01	/* Partial activation? */
 #define LCK_MIRROR_NOSYNC_MODE		0x02	/* Mirrors don't require sync */
 #define LCK_DMEVENTD_MONITOR_MODE	0x04	/* Register with dmeventd */
+
+/* Not yet used. */
 #define LCK_CONVERT			0x08	/* Convert existing lock */
+
 #define LCK_TEST_MODE			0x10    /* Test mode: No activation */
 #define LCK_ORIGIN_ONLY_MODE		0x20	/* Same as above */
 #define LCK_DMEVENTD_MONITOR_IGNORE     0x40	/* Whether to ignore dmeventd */
-
-// FIXME: conflict here (CLUSTER_VG is used here)
 #define LCK_REVERT_MODE			0x80	/* Remove inactive tables */
-#define LCK_CLUSTER_VG			0x80	/* VG is clustered */
 
 /*
  * Special cases of VG locks.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* LVM2/lib/locking locking.h
@ 2011-12-03 11:34 mbroz
  0 siblings, 0 replies; 10+ messages in thread
From: mbroz @ 2011-12-03 11:34 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mbroz@sourceware.org	2011-12-03 11:34:36

Modified files:
	lib/locking    : locking.h 

Log message:
	Switch locking bits to match RHEL5 version.
	
	FIXME:
	There is a problem with overloaded bit 0x80 in locking flag,
	the bit flags array must be extended or changed.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.h.diff?cvsroot=lvm2&r1=1.70&r2=1.71

--- LVM2/lib/locking/locking.h	2011/11/30 17:00:58	1.70
+++ LVM2/lib/locking/locking.h	2011/12/03 11:34:35	1.71
@@ -94,7 +94,8 @@
 #define LCK_NONBLOCK	0x00000010U	/* Don't block waiting for lock? */
 #define LCK_HOLD	0x00000020U	/* Hold lock when lock_vol returns? */
 #define LCK_LOCAL	0x00000040U	/* Don't propagate to other nodes */
-#define LCK_CLUSTER_VG	0x00000080U	/* VG is clustered */
+// FIXME: not used in lock bit byte
+//#define LCK_CLUSTER_VG	0x00000080U	/* VG is clustered */
 #define LCK_CACHE	0x00000100U	/* Operation on cache only using P_ lock */
 #define LCK_ORIGIN_ONLY	0x00000200U	/* Operation should bypass any snapshots */
 #define LCK_REVERT	0x00000400U	/* Revert any incomplete change */
@@ -106,10 +107,13 @@
 #define LCK_MIRROR_NOSYNC_MODE		0x02	/* Mirrors don't require sync */
 #define LCK_DMEVENTD_MONITOR_MODE	0x04	/* Register with dmeventd */
 #define LCK_CONVERT			0x08	/* Convert existing lock */
-#define LCK_ORIGIN_ONLY_MODE		0x20	/* Same as above */
 #define LCK_TEST_MODE			0x10    /* Test mode: No activation */
-#define LCK_REVERT_MODE			0x40	/* Remove inactive tables */
-#define LCK_DMEVENTD_MONITOR_IGNORE     0x80	/* Whether to ignore dmeventd */
+#define LCK_ORIGIN_ONLY_MODE		0x20	/* Same as above */
+#define LCK_DMEVENTD_MONITOR_IGNORE     0x40	/* Whether to ignore dmeventd */
+
+// FIXME: conlict here (CLUSTER_VG is used in lock bits byte)
+#define LCK_REVERT_MODE			0x80	/* Remove inactive tables */
+#define LCK_CLUSTER_VG			0x80	/* VG is clustered */
 
 /*
  * Special cases of VG locks.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* LVM2/lib/locking locking.h
@ 2010-05-19  1:49 agk
  0 siblings, 0 replies; 10+ messages in thread
From: agk @ 2010-05-19  1:49 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2010-05-19 01:49:09

Modified files:
	lib/locking    : locking.h 

Log message:
	Note that orphan lock is always obtained last

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.h.diff?cvsroot=lvm2&r1=1.54&r2=1.55

--- LVM2/lib/locking/locking.h	2010/05/06 11:15:55	1.54
+++ LVM2/lib/locking/locking.h	2010/05/19 01:49:08	1.55
@@ -36,7 +36,8 @@
  *   Set LCK_CACHE flag when manipulating 'vol' metadata in the internal cache.
  *   (Like commit, revert or invalidate metadata.)
  *   If more than one lock needs to be held simultaneously, they must be
- *   acquired in alphabetical order of 'vol' (to avoid deadlocks).
+ *   acquired in alphabetical order of 'vol' (to avoid deadlocks), with
+ *   VG_ORPHANS last.
  *
  * LCK_LV:
  *   Lock/unlock an individual logical volume


^ permalink raw reply	[flat|nested] 10+ messages in thread

* LVM2/lib/locking locking.h
@ 2009-10-01 14:15 ccaulfield
  0 siblings, 0 replies; 10+ messages in thread
From: ccaulfield @ 2009-10-01 14:15 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	ccaulfield@sourceware.org	2009-10-01 14:15:34

Modified files:
	lib/locking    : locking.h 

Log message:
	Add LCK_CONVERT flag I missed on the last checkin.

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

--- LVM2/lib/locking/locking.h	2009/09/02 21:34:11	1.51
+++ LVM2/lib/locking/locking.h	2009/10/01 14:15:34	1.52
@@ -90,6 +90,7 @@
 #define LCK_PARTIAL_MODE        0x00000001U	/* Partial activation? */
 #define LCK_MIRROR_NOSYNC_MODE	0x00000002U	/* Mirrors don't require sync */
 #define LCK_DMEVENTD_MONITOR_MODE	0x00000004U	/* Register with dmeventd */
+#define LCK_CONVERT		0x00000008U	/* Convert existing lock */
 
 /*
  * Special cases of VG locks.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* LVM2/lib/locking locking.h
@ 2009-07-24 18:26 agk
  0 siblings, 0 replies; 10+ messages in thread
From: agk @ 2009-07-24 18:26 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2009-07-24 18:26:42

Modified files:
	lib/locking    : locking.h 

Log message:
	remove no-longer-needed NONBLOCK

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

--- LVM2/lib/locking/locking.h	2009/07/24 18:15:07	1.49
+++ LVM2/lib/locking/locking.h	2009/07/24 18:26:42	1.50
@@ -118,7 +118,7 @@
 	(vg_is_clustered((lv)->vg) ? LCK_CLUSTER_VG : 0)
 
 #define lock_lv_vol(cmd, lv, flags)	\
-	lock_vol(cmd, (lv)->lvid.s, flags | LCK_LV_CLUSTERED(lv) | LCK_NONBLOCK)
+	lock_vol(cmd, (lv)->lvid.s, flags | LCK_LV_CLUSTERED(lv))
 
 #define unlock_vg(cmd, vol)	lock_vol(cmd, vol, LCK_VG_UNLOCK)
 #define unlock_and_release_vg(cmd, vg, vol) \


^ permalink raw reply	[flat|nested] 10+ messages in thread

* LVM2/lib/locking locking.h
@ 2007-11-15  2:55 agk
  0 siblings, 0 replies; 10+ messages in thread
From: agk @ 2007-11-15  2:55 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2007-11-15 02:55:22

Modified files:
	lib/locking    : locking.h 

Log message:
	define LCK_NONE for cases when vg_lock_and_read already holds lock
	(temporary - library will use internal ref counting instead)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.h.diff?cvsroot=lvm2&r1=1.35&r2=1.36

--- LVM2/lib/locking/locking.h	2007/08/23 15:02:26	1.35
+++ LVM2/lib/locking/locking.h	2007/11/15 02:55:22	1.36
@@ -86,6 +86,8 @@
 /*
  * Common combinations
  */
+#define LCK_NONE		0
+
 #define LCK_VG_READ		(LCK_VG | LCK_READ | LCK_HOLD)
 #define LCK_VG_WRITE		(LCK_VG | LCK_WRITE | LCK_HOLD)
 #define LCK_VG_UNLOCK		(LCK_VG | LCK_UNLOCK)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* LVM2/lib/locking locking.h
@ 2004-03-26 21:46 agk
  0 siblings, 0 replies; 10+ messages in thread
From: agk @ 2004-03-26 21:46 UTC (permalink / raw)
  To: lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2004-03-26 21:46:02

Modified files:
	lib/locking    : locking.h 

Log message:
	missing definition

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.h.diff?cvsroot=lvm2&r1=1.15&r2=1.16


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-04-24 12:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-03 11:36 LVM2/lib/locking locking.h mbroz
  -- strict thread matches above, loose matches on Subject: below --
2012-04-24 12:17 zkabelac
2012-02-27  9:54 zkabelac
2011-12-08 18:09 agk
2011-12-03 11:34 mbroz
2010-05-19  1:49 agk
2009-10-01 14:15 ccaulfield
2009-07-24 18:26 agk
2007-11-15  2:55 agk
2004-03-26 21:46 agk

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).