aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dlm_device.h
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2007-05-18 10:00:32 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2007-07-09 03:22:36 -0400
commitd7db923ea4990edb5583bf54af868ba687a1bc84 (patch)
tree3efa0db00a3a6400f43a65aef2726fa813f9dfa2 /include/linux/dlm_device.h
parent3ae1acf93a21512512f8a78430fcde5992dd208e (diff)
[DLM] dlm_device interface changes [3/6]
Change the user/kernel device interface used by libdlm: - Add ability for userspace to check the version of the interface. libdlm can now adapt to different versions of the kernel interface. - Increase the size of the flags passed in a lock request so all possible flags can be used from userspace. - Add an opaque "xid" value for each lock. This "transaction id" will be used later to associate locks with each other during deadlock detection. - Add a "timeout" value for each lock. This is used along with the DLM_LKF_TIMEOUT flag. Also, remove a fragment of unused code in device_read(). This patch requires updating libdlm which is backward compatible with older kernels. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'include/linux/dlm_device.h')
-rw-r--r--include/linux/dlm_device.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/include/linux/dlm_device.h b/include/linux/dlm_device.h
index c2735cab2ebf..f7b9b57348a8 100644
--- a/include/linux/dlm_device.h
+++ b/include/linux/dlm_device.h
@@ -2,7 +2,7 @@
2******************************************************************************* 2*******************************************************************************
3** 3**
4** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. 4** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
5** Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. 5** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
6** 6**
7** This copyrighted material is made available to anyone wishing to use, 7** This copyrighted material is made available to anyone wishing to use,
8** modify, copy, or redistribute it subject to the terms and conditions 8** modify, copy, or redistribute it subject to the terms and conditions
@@ -18,21 +18,24 @@
18#define DLM_USER_LVB_LEN 32 18#define DLM_USER_LVB_LEN 32
19 19
20/* Version of the device interface */ 20/* Version of the device interface */
21#define DLM_DEVICE_VERSION_MAJOR 5 21#define DLM_DEVICE_VERSION_MAJOR 6
22#define DLM_DEVICE_VERSION_MINOR 1 22#define DLM_DEVICE_VERSION_MINOR 0
23#define DLM_DEVICE_VERSION_PATCH 0 23#define DLM_DEVICE_VERSION_PATCH 0
24 24
25/* struct passed to the lock write */ 25/* struct passed to the lock write */
26struct dlm_lock_params { 26struct dlm_lock_params {
27 __u8 mode; 27 __u8 mode;
28 __u8 namelen; 28 __u8 namelen;
29 __u16 flags; 29 __u16 unused;
30 __u32 flags;
30 __u32 lkid; 31 __u32 lkid;
31 __u32 parent; 32 __u32 parent;
32 void __user *castparam; 33 __u64 xid;
34 __u64 timeout;
35 void __user *castparam;
33 void __user *castaddr; 36 void __user *castaddr;
34 void __user *bastparam; 37 void __user *bastparam;
35 void __user *bastaddr; 38 void __user *bastaddr;
36 struct dlm_lksb __user *lksb; 39 struct dlm_lksb __user *lksb;
37 char lvb[DLM_USER_LVB_LEN]; 40 char lvb[DLM_USER_LVB_LEN];
38 char name[0]; 41 char name[0];
@@ -62,9 +65,15 @@ struct dlm_write_request {
62 } i; 65 } i;
63}; 66};
64 67
68struct dlm_device_version {
69 __u32 version[3];
70};
71
65/* struct read from the "device" fd, 72/* struct read from the "device" fd,
66 consists mainly of userspace pointers for the library to use */ 73 consists mainly of userspace pointers for the library to use */
74
67struct dlm_lock_result { 75struct dlm_lock_result {
76 __u32 version[3];
68 __u32 length; 77 __u32 length;
69 void __user * user_astaddr; 78 void __user * user_astaddr;
70 void __user * user_astparam; 79 void __user * user_astparam;