* [Cluster-devel] [PATCH] dlm: Split lock mode and flag constants into a sharable header.
@ 2007-10-09 8:05 Joel Becker
2007-10-10 12:10 ` Steven Whitehouse
0 siblings, 1 reply; 6+ messages in thread
From: Joel Becker @ 2007-10-09 8:05 UTC (permalink / raw)
To: cluster-devel.redhat.com
This allows others to use the DLM constants without being tied to the
function API of fs/dlm.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
---
include/linux/Kbuild | 1 +
include/linux/dlm.h | 140 +------------------------------------
include/linux/dlmconstants.h | 159 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 162 insertions(+), 138 deletions(-)
create mode 100644 include/linux/dlmconstants.h
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 818cc3a..de1a248 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -49,6 +49,7 @@ header-y += comstats.h
header-y += consolemap.h
header-y += const.h
header-y += cycx_cfm.h
+header-y += dlmconstants.h
header-y += dlm_device.h
header-y += dlm_netlink.h
header-y += dm-ioctl.h
diff --git a/include/linux/dlm.h b/include/linux/dlm.h
index be9d278..c743fbc 100644
--- a/include/linux/dlm.h
+++ b/include/linux/dlm.h
@@ -19,148 +19,12 @@
* routines and structures to use DLM lockspaces
*/
-/*
- * Lock Modes
- */
+/* Lock levels and flags are here */
+#include <linux/dlmconstants.h>
-#define DLM_LOCK_IV -1 /* invalid */
-#define DLM_LOCK_NL 0 /* null */
-#define DLM_LOCK_CR 1 /* concurrent read */
-#define DLM_LOCK_CW 2 /* concurrent write */
-#define DLM_LOCK_PR 3 /* protected read */
-#define DLM_LOCK_PW 4 /* protected write */
-#define DLM_LOCK_EX 5 /* exclusive */
-
-/*
- * Maximum size in bytes of a dlm_lock name
- */
#define DLM_RESNAME_MAXLEN 64
-/*
- * Flags to dlm_lock
- *
- * DLM_LKF_NOQUEUE
- *
- * Do not queue the lock request on the wait queue if it cannot be granted
- * immediately. If the lock cannot be granted because of this flag, DLM will
- * either return -EAGAIN from the dlm_lock call or will return 0 from
- * dlm_lock and -EAGAIN in the lock status block when the AST is executed.
- *
- * DLM_LKF_CANCEL
- *
- * Used to cancel a pending lock request or conversion. A converting lock is
- * returned to its previously granted mode.
- *
- * DLM_LKF_CONVERT
- *
- * Indicates a lock conversion request. For conversions the name and namelen
- * are ignored and the lock ID in the LKSB is used to identify the lock.
- *
- * DLM_LKF_VALBLK
- *
- * Requests DLM to return the current contents of the lock value block in the
- * lock status block. When this flag is set in a lock conversion from PW or EX
- * modes, DLM assigns the value specified in the lock status block to the lock
- * value block of the lock resource. The LVB is a DLM_LVB_LEN size array
- * containing application-specific information.
- *
- * DLM_LKF_QUECVT
- *
- * Force a conversion request to be queued, even if it is compatible with
- * the granted modes of other locks on the same resource.
- *
- * DLM_LKF_IVVALBLK
- *
- * Invalidate the lock value block.
- *
- * DLM_LKF_CONVDEADLK
- *
- * Allows the dlm to resolve conversion deadlocks internally by demoting the
- * granted mode of a converting lock to NL. The DLM_SBF_DEMOTED flag is
- * returned for a conversion that's been effected by this.
- *
- * DLM_LKF_PERSISTENT
- *
- * Only relevant to locks originating in userspace. A persistent lock will not
- * be removed if the process holding the lock exits.
- *
- * DLM_LKF_NODLCKWT
- *
- * Do not cancel the lock if it gets into conversion deadlock.
- * Exclude this lock from being monitored due to DLM_LSFL_TIMEWARN.
- *
- * DLM_LKF_NODLCKBLK
- *
- * net yet implemented
- *
- * DLM_LKF_EXPEDITE
- *
- * Used only with new requests for NL mode locks. Tells the lock manager
- * to grant the lock, ignoring other locks in convert and wait queues.
- *
- * DLM_LKF_NOQUEUEBAST
- *
- * Send blocking AST's before returning -EAGAIN to the caller. It is only
- * used along with the NOQUEUE flag. Blocking AST's are not sent for failed
- * NOQUEUE requests otherwise.
- *
- * DLM_LKF_HEADQUE
- *
- * Add a lock to the head of the convert or wait queue rather than the tail.
- *
- * DLM_LKF_NOORDER
- *
- * Disregard the standard grant order rules and grant a lock as soon as it
- * is compatible with other granted locks.
- *
- * DLM_LKF_ORPHAN
- *
- * not yet implemented
- *
- * DLM_LKF_ALTPR
- *
- * If the requested mode cannot be granted immediately, try to grant the lock
- * in PR mode instead. If this alternate mode is granted instead of the
- * requested mode, DLM_SBF_ALTMODE is returned in the lksb.
- *
- * DLM_LKF_ALTCW
- *
- * The same as ALTPR, but the alternate mode is CW.
- *
- * DLM_LKF_FORCEUNLOCK
- *
- * Unlock the lock even if it is converting or waiting or has sublocks.
- * Only really for use by the userland device.c code.
- *
- */
-
-#define DLM_LKF_NOQUEUE 0x00000001
-#define DLM_LKF_CANCEL 0x00000002
-#define DLM_LKF_CONVERT 0x00000004
-#define DLM_LKF_VALBLK 0x00000008
-#define DLM_LKF_QUECVT 0x00000010
-#define DLM_LKF_IVVALBLK 0x00000020
-#define DLM_LKF_CONVDEADLK 0x00000040
-#define DLM_LKF_PERSISTENT 0x00000080
-#define DLM_LKF_NODLCKWT 0x00000100
-#define DLM_LKF_NODLCKBLK 0x00000200
-#define DLM_LKF_EXPEDITE 0x00000400
-#define DLM_LKF_NOQUEUEBAST 0x00000800
-#define DLM_LKF_HEADQUE 0x00001000
-#define DLM_LKF_NOORDER 0x00002000
-#define DLM_LKF_ORPHAN 0x00004000
-#define DLM_LKF_ALTPR 0x00008000
-#define DLM_LKF_ALTCW 0x00010000
-#define DLM_LKF_FORCEUNLOCK 0x00020000
-#define DLM_LKF_TIMEOUT 0x00040000
-
-/*
- * Some return codes that are not in errno.h
- */
-
-#define DLM_ECANCEL 0x10001
-#define DLM_EUNLOCK 0x10002
typedef void dlm_lockspace_t;
diff --git a/include/linux/dlmconstants.h b/include/linux/dlmconstants.h
new file mode 100644
index 0000000..fddb3d3
--- /dev/null
+++ b/include/linux/dlmconstants.h
@@ -0,0 +1,159 @@
+/******************************************************************************
+*******************************************************************************
+**
+** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
+** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
+**
+** This copyrighted material is made available to anyone wishing to use,
+** modify, copy, or redistribute it subject to the terms and conditions
+** of the GNU General Public License v.2.
+**
+*******************************************************************************
+******************************************************************************/
+
+#ifndef __DLMCONSTANTS_DOT_H__
+#define __DLMCONSTANTS_DOT_H__
+
+/*
+ * Constants used by DLM interface.
+ */
+
+/*
+ * Lock Modes
+ */
+
+#define DLM_LOCK_IV (-1) /* invalid */
+#define DLM_LOCK_NL 0 /* null */
+#define DLM_LOCK_CR 1 /* concurrent read */
+#define DLM_LOCK_CW 2 /* concurrent write */
+#define DLM_LOCK_PR 3 /* protected read */
+#define DLM_LOCK_PW 4 /* protected write */
+#define DLM_LOCK_EX 5 /* exclusive */
+
+
+/*
+ * Flags to dlm_lock
+ *
+ * DLM_LKF_NOQUEUE
+ *
+ * Do not queue the lock request on the wait queue if it cannot be granted
+ * immediately. If the lock cannot be granted because of this flag, DLM will
+ * either return -EAGAIN from the dlm_lock call or will return 0 from
+ * dlm_lock and -EAGAIN in the lock status block when the AST is executed.
+ *
+ * DLM_LKF_CANCEL
+ *
+ * Used to cancel a pending lock request or conversion. A converting lock is
+ * returned to its previously granted mode.
+ *
+ * DLM_LKF_CONVERT
+ *
+ * Indicates a lock conversion request. For conversions the name and namelen
+ * are ignored and the lock ID in the LKSB is used to identify the lock.
+ *
+ * DLM_LKF_VALBLK
+ *
+ * Requests DLM to return the current contents of the lock value block in the
+ * lock status block. When this flag is set in a lock conversion from PW or EX
+ * modes, DLM assigns the value specified in the lock status block to the lock
+ * value block of the lock resource. The LVB is a DLM_LVB_LEN size array
+ * containing application-specific information.
+ *
+ * DLM_LKF_QUECVT
+ *
+ * Force a conversion request to be queued, even if it is compatible with
+ * the granted modes of other locks on the same resource.
+ *
+ * DLM_LKF_IVVALBLK
+ *
+ * Invalidate the lock value block.
+ *
+ * DLM_LKF_CONVDEADLK
+ *
+ * Allows the dlm to resolve conversion deadlocks internally by demoting the
+ * granted mode of a converting lock to NL. The DLM_SBF_DEMOTED flag is
+ * returned for a conversion that's been effected by this.
+ *
+ * DLM_LKF_PERSISTENT
+ *
+ * Only relevant to locks originating in userspace. A persistent lock will not
+ * be removed if the process holding the lock exits.
+ *
+ * DLM_LKF_NODLCKWT
+ *
+ * Do not cancel the lock if it gets into conversion deadlock.
+ * Exclude this lock from being monitored due to DLM_LSFL_TIMEWARN.
+ *
+ * DLM_LKF_NODLCKBLK
+ *
+ * net yet implemented
+ *
+ * DLM_LKF_EXPEDITE
+ *
+ * Used only with new requests for NL mode locks. Tells the lock manager
+ * to grant the lock, ignoring other locks in convert and wait queues.
+ *
+ * DLM_LKF_NOQUEUEBAST
+ *
+ * Send blocking AST's before returning -EAGAIN to the caller. It is only
+ * used along with the NOQUEUE flag. Blocking AST's are not sent for failed
+ * NOQUEUE requests otherwise.
+ *
+ * DLM_LKF_HEADQUE
+ *
+ * Add a lock to the head of the convert or wait queue rather than the tail.
+ *
+ * DLM_LKF_NOORDER
+ *
+ * Disregard the standard grant order rules and grant a lock as soon as it
+ * is compatible with other granted locks.
+ *
+ * DLM_LKF_ORPHAN
+ *
+ * not yet implemented
+ *
+ * DLM_LKF_ALTPR
+ *
+ * If the requested mode cannot be granted immediately, try to grant the lock
+ * in PR mode instead. If this alternate mode is granted instead of the
+ * requested mode, DLM_SBF_ALTMODE is returned in the lksb.
+ *
+ * DLM_LKF_ALTCW
+ *
+ * The same as ALTPR, but the alternate mode is CW.
+ *
+ * DLM_LKF_FORCEUNLOCK
+ *
+ * Unlock the lock even if it is converting or waiting or has sublocks.
+ * Only really for use by the userland device.c code.
+ *
+ */
+
+#define DLM_LKF_NOQUEUE 0x00000001
+#define DLM_LKF_CANCEL 0x00000002
+#define DLM_LKF_CONVERT 0x00000004
+#define DLM_LKF_VALBLK 0x00000008
+#define DLM_LKF_QUECVT 0x00000010
+#define DLM_LKF_IVVALBLK 0x00000020
+#define DLM_LKF_CONVDEADLK 0x00000040
+#define DLM_LKF_PERSISTENT 0x00000080
+#define DLM_LKF_NODLCKWT 0x00000100
+#define DLM_LKF_NODLCKBLK 0x00000200
+#define DLM_LKF_EXPEDITE 0x00000400
+#define DLM_LKF_NOQUEUEBAST 0x00000800
+#define DLM_LKF_HEADQUE 0x00001000
+#define DLM_LKF_NOORDER 0x00002000
+#define DLM_LKF_ORPHAN 0x00004000
+#define DLM_LKF_ALTPR 0x00008000
+#define DLM_LKF_ALTCW 0x00010000
+#define DLM_LKF_FORCEUNLOCK 0x00020000
+#define DLM_LKF_TIMEOUT 0x00040000
+
+/*
+ * Some return codes that are not in errno.h
+ */
+
+#define DLM_ECANCEL 0x10001
+#define DLM_EUNLOCK 0x10002
+
+#endif /* __DLMCONSTANTS_DOT_H__ */
--
1.5.2.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Cluster-devel] [PATCH] dlm: Split lock mode and flag constants into a sharable header.
2007-10-09 8:05 [Cluster-devel] [PATCH] dlm: Split lock mode and flag constants into a sharable header Joel Becker
@ 2007-10-10 12:10 ` Steven Whitehouse
2007-10-18 22:02 ` Mark Fasheh
0 siblings, 1 reply; 6+ messages in thread
From: Steven Whitehouse @ 2007-10-10 12:10 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
I'll add this to the -nmw git tree as soon as Linus has pulled the
current tree,
Steve.
On Tue, 2007-10-09 at 01:05 -0700, Joel Becker wrote:
> This allows others to use the DLM constants without being tied to the
> function API of fs/dlm.
>
> Signed-off-by: Joel Becker <joel.becker@oracle.com>
> ---
> include/linux/Kbuild | 1 +
> include/linux/dlm.h | 140 +------------------------------------
> include/linux/dlmconstants.h | 159 ++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 162 insertions(+), 138 deletions(-)
> create mode 100644 include/linux/dlmconstants.h
>
> diff --git a/include/linux/Kbuild b/include/linux/Kbuild
> index 818cc3a..de1a248 100644
> --- a/include/linux/Kbuild
> +++ b/include/linux/Kbuild
> @@ -49,6 +49,7 @@ header-y += comstats.h
> header-y += consolemap.h
> header-y += const.h
> header-y += cycx_cfm.h
> +header-y += dlmconstants.h
> header-y += dlm_device.h
> header-y += dlm_netlink.h
> header-y += dm-ioctl.h
> diff --git a/include/linux/dlm.h b/include/linux/dlm.h
> index be9d278..c743fbc 100644
> --- a/include/linux/dlm.h
> +++ b/include/linux/dlm.h
> @@ -19,148 +19,12 @@
> * routines and structures to use DLM lockspaces
> */
>
> -/*
> - * Lock Modes
> - */
> +/* Lock levels and flags are here */
> +#include <linux/dlmconstants.h>
>
> -#define DLM_LOCK_IV -1 /* invalid */
> -#define DLM_LOCK_NL 0 /* null */
> -#define DLM_LOCK_CR 1 /* concurrent read */
> -#define DLM_LOCK_CW 2 /* concurrent write */
> -#define DLM_LOCK_PR 3 /* protected read */
> -#define DLM_LOCK_PW 4 /* protected write */
> -#define DLM_LOCK_EX 5 /* exclusive */
> -
> -/*
> - * Maximum size in bytes of a dlm_lock name
> - */
>
> #define DLM_RESNAME_MAXLEN 64
>
> -/*
> - * Flags to dlm_lock
> - *
> - * DLM_LKF_NOQUEUE
> - *
> - * Do not queue the lock request on the wait queue if it cannot be granted
> - * immediately. If the lock cannot be granted because of this flag, DLM will
> - * either return -EAGAIN from the dlm_lock call or will return 0 from
> - * dlm_lock and -EAGAIN in the lock status block when the AST is executed.
> - *
> - * DLM_LKF_CANCEL
> - *
> - * Used to cancel a pending lock request or conversion. A converting lock is
> - * returned to its previously granted mode.
> - *
> - * DLM_LKF_CONVERT
> - *
> - * Indicates a lock conversion request. For conversions the name and namelen
> - * are ignored and the lock ID in the LKSB is used to identify the lock.
> - *
> - * DLM_LKF_VALBLK
> - *
> - * Requests DLM to return the current contents of the lock value block in the
> - * lock status block. When this flag is set in a lock conversion from PW or EX
> - * modes, DLM assigns the value specified in the lock status block to the lock
> - * value block of the lock resource. The LVB is a DLM_LVB_LEN size array
> - * containing application-specific information.
> - *
> - * DLM_LKF_QUECVT
> - *
> - * Force a conversion request to be queued, even if it is compatible with
> - * the granted modes of other locks on the same resource.
> - *
> - * DLM_LKF_IVVALBLK
> - *
> - * Invalidate the lock value block.
> - *
> - * DLM_LKF_CONVDEADLK
> - *
> - * Allows the dlm to resolve conversion deadlocks internally by demoting the
> - * granted mode of a converting lock to NL. The DLM_SBF_DEMOTED flag is
> - * returned for a conversion that's been effected by this.
> - *
> - * DLM_LKF_PERSISTENT
> - *
> - * Only relevant to locks originating in userspace. A persistent lock will not
> - * be removed if the process holding the lock exits.
> - *
> - * DLM_LKF_NODLCKWT
> - *
> - * Do not cancel the lock if it gets into conversion deadlock.
> - * Exclude this lock from being monitored due to DLM_LSFL_TIMEWARN.
> - *
> - * DLM_LKF_NODLCKBLK
> - *
> - * net yet implemented
> - *
> - * DLM_LKF_EXPEDITE
> - *
> - * Used only with new requests for NL mode locks. Tells the lock manager
> - * to grant the lock, ignoring other locks in convert and wait queues.
> - *
> - * DLM_LKF_NOQUEUEBAST
> - *
> - * Send blocking AST's before returning -EAGAIN to the caller. It is only
> - * used along with the NOQUEUE flag. Blocking AST's are not sent for failed
> - * NOQUEUE requests otherwise.
> - *
> - * DLM_LKF_HEADQUE
> - *
> - * Add a lock to the head of the convert or wait queue rather than the tail.
> - *
> - * DLM_LKF_NOORDER
> - *
> - * Disregard the standard grant order rules and grant a lock as soon as it
> - * is compatible with other granted locks.
> - *
> - * DLM_LKF_ORPHAN
> - *
> - * not yet implemented
> - *
> - * DLM_LKF_ALTPR
> - *
> - * If the requested mode cannot be granted immediately, try to grant the lock
> - * in PR mode instead. If this alternate mode is granted instead of the
> - * requested mode, DLM_SBF_ALTMODE is returned in the lksb.
> - *
> - * DLM_LKF_ALTCW
> - *
> - * The same as ALTPR, but the alternate mode is CW.
> - *
> - * DLM_LKF_FORCEUNLOCK
> - *
> - * Unlock the lock even if it is converting or waiting or has sublocks.
> - * Only really for use by the userland device.c code.
> - *
> - */
> -
> -#define DLM_LKF_NOQUEUE 0x00000001
> -#define DLM_LKF_CANCEL 0x00000002
> -#define DLM_LKF_CONVERT 0x00000004
> -#define DLM_LKF_VALBLK 0x00000008
> -#define DLM_LKF_QUECVT 0x00000010
> -#define DLM_LKF_IVVALBLK 0x00000020
> -#define DLM_LKF_CONVDEADLK 0x00000040
> -#define DLM_LKF_PERSISTENT 0x00000080
> -#define DLM_LKF_NODLCKWT 0x00000100
> -#define DLM_LKF_NODLCKBLK 0x00000200
> -#define DLM_LKF_EXPEDITE 0x00000400
> -#define DLM_LKF_NOQUEUEBAST 0x00000800
> -#define DLM_LKF_HEADQUE 0x00001000
> -#define DLM_LKF_NOORDER 0x00002000
> -#define DLM_LKF_ORPHAN 0x00004000
> -#define DLM_LKF_ALTPR 0x00008000
> -#define DLM_LKF_ALTCW 0x00010000
> -#define DLM_LKF_FORCEUNLOCK 0x00020000
> -#define DLM_LKF_TIMEOUT 0x00040000
> -
> -/*
> - * Some return codes that are not in errno.h
> - */
> -
> -#define DLM_ECANCEL 0x10001
> -#define DLM_EUNLOCK 0x10002
>
> typedef void dlm_lockspace_t;
>
> diff --git a/include/linux/dlmconstants.h b/include/linux/dlmconstants.h
> new file mode 100644
> index 0000000..fddb3d3
> --- /dev/null
> +++ b/include/linux/dlmconstants.h
> @@ -0,0 +1,159 @@
> +/******************************************************************************
> +*******************************************************************************
> +**
> +** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
> +** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
> +**
> +** This copyrighted material is made available to anyone wishing to use,
> +** modify, copy, or redistribute it subject to the terms and conditions
> +** of the GNU General Public License v.2.
> +**
> +*******************************************************************************
> +******************************************************************************/
> +
> +#ifndef __DLMCONSTANTS_DOT_H__
> +#define __DLMCONSTANTS_DOT_H__
> +
> +/*
> + * Constants used by DLM interface.
> + */
> +
> +/*
> + * Lock Modes
> + */
> +
> +#define DLM_LOCK_IV (-1) /* invalid */
> +#define DLM_LOCK_NL 0 /* null */
> +#define DLM_LOCK_CR 1 /* concurrent read */
> +#define DLM_LOCK_CW 2 /* concurrent write */
> +#define DLM_LOCK_PR 3 /* protected read */
> +#define DLM_LOCK_PW 4 /* protected write */
> +#define DLM_LOCK_EX 5 /* exclusive */
> +
> +
> +/*
> + * Flags to dlm_lock
> + *
> + * DLM_LKF_NOQUEUE
> + *
> + * Do not queue the lock request on the wait queue if it cannot be granted
> + * immediately. If the lock cannot be granted because of this flag, DLM will
> + * either return -EAGAIN from the dlm_lock call or will return 0 from
> + * dlm_lock and -EAGAIN in the lock status block when the AST is executed.
> + *
> + * DLM_LKF_CANCEL
> + *
> + * Used to cancel a pending lock request or conversion. A converting lock is
> + * returned to its previously granted mode.
> + *
> + * DLM_LKF_CONVERT
> + *
> + * Indicates a lock conversion request. For conversions the name and namelen
> + * are ignored and the lock ID in the LKSB is used to identify the lock.
> + *
> + * DLM_LKF_VALBLK
> + *
> + * Requests DLM to return the current contents of the lock value block in the
> + * lock status block. When this flag is set in a lock conversion from PW or EX
> + * modes, DLM assigns the value specified in the lock status block to the lock
> + * value block of the lock resource. The LVB is a DLM_LVB_LEN size array
> + * containing application-specific information.
> + *
> + * DLM_LKF_QUECVT
> + *
> + * Force a conversion request to be queued, even if it is compatible with
> + * the granted modes of other locks on the same resource.
> + *
> + * DLM_LKF_IVVALBLK
> + *
> + * Invalidate the lock value block.
> + *
> + * DLM_LKF_CONVDEADLK
> + *
> + * Allows the dlm to resolve conversion deadlocks internally by demoting the
> + * granted mode of a converting lock to NL. The DLM_SBF_DEMOTED flag is
> + * returned for a conversion that's been effected by this.
> + *
> + * DLM_LKF_PERSISTENT
> + *
> + * Only relevant to locks originating in userspace. A persistent lock will not
> + * be removed if the process holding the lock exits.
> + *
> + * DLM_LKF_NODLCKWT
> + *
> + * Do not cancel the lock if it gets into conversion deadlock.
> + * Exclude this lock from being monitored due to DLM_LSFL_TIMEWARN.
> + *
> + * DLM_LKF_NODLCKBLK
> + *
> + * net yet implemented
> + *
> + * DLM_LKF_EXPEDITE
> + *
> + * Used only with new requests for NL mode locks. Tells the lock manager
> + * to grant the lock, ignoring other locks in convert and wait queues.
> + *
> + * DLM_LKF_NOQUEUEBAST
> + *
> + * Send blocking AST's before returning -EAGAIN to the caller. It is only
> + * used along with the NOQUEUE flag. Blocking AST's are not sent for failed
> + * NOQUEUE requests otherwise.
> + *
> + * DLM_LKF_HEADQUE
> + *
> + * Add a lock to the head of the convert or wait queue rather than the tail.
> + *
> + * DLM_LKF_NOORDER
> + *
> + * Disregard the standard grant order rules and grant a lock as soon as it
> + * is compatible with other granted locks.
> + *
> + * DLM_LKF_ORPHAN
> + *
> + * not yet implemented
> + *
> + * DLM_LKF_ALTPR
> + *
> + * If the requested mode cannot be granted immediately, try to grant the lock
> + * in PR mode instead. If this alternate mode is granted instead of the
> + * requested mode, DLM_SBF_ALTMODE is returned in the lksb.
> + *
> + * DLM_LKF_ALTCW
> + *
> + * The same as ALTPR, but the alternate mode is CW.
> + *
> + * DLM_LKF_FORCEUNLOCK
> + *
> + * Unlock the lock even if it is converting or waiting or has sublocks.
> + * Only really for use by the userland device.c code.
> + *
> + */
> +
> +#define DLM_LKF_NOQUEUE 0x00000001
> +#define DLM_LKF_CANCEL 0x00000002
> +#define DLM_LKF_CONVERT 0x00000004
> +#define DLM_LKF_VALBLK 0x00000008
> +#define DLM_LKF_QUECVT 0x00000010
> +#define DLM_LKF_IVVALBLK 0x00000020
> +#define DLM_LKF_CONVDEADLK 0x00000040
> +#define DLM_LKF_PERSISTENT 0x00000080
> +#define DLM_LKF_NODLCKWT 0x00000100
> +#define DLM_LKF_NODLCKBLK 0x00000200
> +#define DLM_LKF_EXPEDITE 0x00000400
> +#define DLM_LKF_NOQUEUEBAST 0x00000800
> +#define DLM_LKF_HEADQUE 0x00001000
> +#define DLM_LKF_NOORDER 0x00002000
> +#define DLM_LKF_ORPHAN 0x00004000
> +#define DLM_LKF_ALTPR 0x00008000
> +#define DLM_LKF_ALTCW 0x00010000
> +#define DLM_LKF_FORCEUNLOCK 0x00020000
> +#define DLM_LKF_TIMEOUT 0x00040000
> +
> +/*
> + * Some return codes that are not in errno.h
> + */
> +
> +#define DLM_ECANCEL 0x10001
> +#define DLM_EUNLOCK 0x10002
> +
> +#endif /* __DLMCONSTANTS_DOT_H__ */
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Cluster-devel] [PATCH] dlm: Split lock mode and flag constants into a sharable header.
2007-10-10 12:10 ` Steven Whitehouse
@ 2007-10-18 22:02 ` Mark Fasheh
2007-10-19 9:52 ` Steven Whitehouse
2007-10-19 17:02 ` David Teigland
0 siblings, 2 replies; 6+ messages in thread
From: Mark Fasheh @ 2007-10-18 22:02 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hey Steve,
On Wed, Oct 10, 2007 at 01:10:21PM +0100, Steven Whitehouse wrote:
> I'll add this to the -nmw git tree as soon as Linus has pulled the
> current tree,
Actually, it'd be much easier on us (and more importantly, akpm) if I could
just carry this patch in ocfs2.git since a bunch of Joel's cluster stack
work depends on it.
Could I just get a sign-off from you before I put it in our git tree?
Thanks,
--Mark
--
Mark Fasheh
Senior Software Developer, Oracle
mark.fasheh at oracle.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Cluster-devel] [PATCH] dlm: Split lock mode and flag constants into a sharable header.
2007-10-18 22:02 ` Mark Fasheh
@ 2007-10-19 9:52 ` Steven Whitehouse
2007-10-19 17:22 ` Mark Fasheh
2007-10-19 17:02 ` David Teigland
1 sibling, 1 reply; 6+ messages in thread
From: Steven Whitehouse @ 2007-10-19 9:52 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
On Thu, 2007-10-18 at 15:02 -0700, Mark Fasheh wrote:
> Hey Steve,
>
> On Wed, Oct 10, 2007 at 01:10:21PM +0100, Steven Whitehouse wrote:
> > I'll add this to the -nmw git tree as soon as Linus has pulled the
> > current tree,
>
> Actually, it'd be much easier on us (and more importantly, akpm) if I could
> just carry this patch in ocfs2.git since a bunch of Joel's cluster stack
> work depends on it.
>
> Could I just get a sign-off from you before I put it in our git tree?
>
> Thanks,
> --Mark
>
> --
> Mark Fasheh
> Senior Software Developer, Oracle
> mark.fasheh at oracle.com
Yes, thats fine by me. Really its for Patrick & Dave to sign off since
its DLM, but I'm happy to add my name too since I know they are happy
with it. The only thing we need to take care of is that since its
already in my tree, is that we don't surprise Andrew Morton by having it
both trees at once :-)
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
I'll try and drop it out of my tree sometime today so that the way will
be clear for you to include it,
Steve.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Cluster-devel] [PATCH] dlm: Split lock mode and flag constants into a sharable header.
2007-10-18 22:02 ` Mark Fasheh
2007-10-19 9:52 ` Steven Whitehouse
@ 2007-10-19 17:02 ` David Teigland
1 sibling, 0 replies; 6+ messages in thread
From: David Teigland @ 2007-10-19 17:02 UTC (permalink / raw)
To: cluster-devel.redhat.com
On Thu, Oct 18, 2007 at 03:02:33PM -0700, Mark Fasheh wrote:
> Hey Steve,
>
> On Wed, Oct 10, 2007 at 01:10:21PM +0100, Steven Whitehouse wrote:
> > I'll add this to the -nmw git tree as soon as Linus has pulled the
> > current tree,
>
> Actually, it'd be much easier on us (and more importantly, akpm) if I could
> just carry this patch in ocfs2.git since a bunch of Joel's cluster stack
> work depends on it.
>
> Could I just get a sign-off from you before I put it in our git tree?
Signed-off-by: David Teigland <teigland@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Cluster-devel] [PATCH] dlm: Split lock mode and flag constants into a sharable header.
2007-10-19 9:52 ` Steven Whitehouse
@ 2007-10-19 17:22 ` Mark Fasheh
0 siblings, 0 replies; 6+ messages in thread
From: Mark Fasheh @ 2007-10-19 17:22 UTC (permalink / raw)
To: cluster-devel.redhat.com
On Fri, Oct 19, 2007 at 10:52:54AM +0100, Steven Whitehouse wrote:
> I'll try and drop it out of my tree sometime today so that the way will
> be clear for you to include it,
Thanks for the signoffs guys. Steve, I'll just be sure to check your tree
before publishing this on kernel.org. Anyway, it probably won't be ready on
my end until Monday, so I think our timing will work out great.
--Mark
--
Mark Fasheh
Senior Software Developer, Oracle
mark.fasheh at oracle.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-10-19 17:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-09 8:05 [Cluster-devel] [PATCH] dlm: Split lock mode and flag constants into a sharable header Joel Becker
2007-10-10 12:10 ` Steven Whitehouse
2007-10-18 22:02 ` Mark Fasheh
2007-10-19 9:52 ` Steven Whitehouse
2007-10-19 17:22 ` Mark Fasheh
2007-10-19 17:02 ` David Teigland
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 NNTP newsgroup(s).