diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/Kbuild | 1 | ||||
-rw-r--r-- | include/linux/dlm.h | 7 | ||||
-rw-r--r-- | include/linux/dlm_netlink.h | 56 |
3 files changed, 61 insertions, 3 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index f317c270d4bf..afae306b177c 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -49,6 +49,7 @@ header-y += consolemap.h | |||
49 | header-y += const.h | 49 | header-y += const.h |
50 | header-y += cycx_cfm.h | 50 | header-y += cycx_cfm.h |
51 | header-y += dlm_device.h | 51 | header-y += dlm_device.h |
52 | header-y += dlm_netlink.h | ||
52 | header-y += dm-ioctl.h | 53 | header-y += dm-ioctl.h |
53 | header-y += dn.h | 54 | header-y += dn.h |
54 | header-y += dqblk_v1.h | 55 | header-y += dqblk_v1.h |
diff --git a/include/linux/dlm.h b/include/linux/dlm.h index 1b1dcb9a40bb..975f17d8aa53 100644 --- a/include/linux/dlm.h +++ b/include/linux/dlm.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 |
@@ -149,6 +149,7 @@ | |||
149 | #define DLM_LKF_ALTPR 0x00008000 | 149 | #define DLM_LKF_ALTPR 0x00008000 |
150 | #define DLM_LKF_ALTCW 0x00010000 | 150 | #define DLM_LKF_ALTCW 0x00010000 |
151 | #define DLM_LKF_FORCEUNLOCK 0x00020000 | 151 | #define DLM_LKF_FORCEUNLOCK 0x00020000 |
152 | #define DLM_LKF_TIMEOUT 0x00040000 | ||
152 | 153 | ||
153 | /* | 154 | /* |
154 | * Some return codes that are not in errno.h | 155 | * Some return codes that are not in errno.h |
@@ -199,11 +200,11 @@ struct dlm_lksb { | |||
199 | char * sb_lvbptr; | 200 | char * sb_lvbptr; |
200 | }; | 201 | }; |
201 | 202 | ||
203 | #define DLM_LSFL_NODIR 0x00000001 | ||
204 | #define DLM_LSFL_TIMEWARN 0x00000002 | ||
202 | 205 | ||
203 | #ifdef __KERNEL__ | 206 | #ifdef __KERNEL__ |
204 | 207 | ||
205 | #define DLM_LSFL_NODIR 0x00000001 | ||
206 | |||
207 | /* | 208 | /* |
208 | * dlm_new_lockspace | 209 | * dlm_new_lockspace |
209 | * | 210 | * |
diff --git a/include/linux/dlm_netlink.h b/include/linux/dlm_netlink.h new file mode 100644 index 000000000000..19276332707a --- /dev/null +++ b/include/linux/dlm_netlink.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 Red Hat, Inc. All rights reserved. | ||
3 | * | ||
4 | * This copyrighted material is made available to anyone wishing to use, | ||
5 | * modify, copy, or redistribute it subject to the terms and conditions | ||
6 | * of the GNU General Public License v.2. | ||
7 | */ | ||
8 | |||
9 | #ifndef _DLM_NETLINK_H | ||
10 | #define _DLM_NETLINK_H | ||
11 | |||
12 | enum { | ||
13 | DLM_STATUS_WAITING = 1, | ||
14 | DLM_STATUS_GRANTED = 2, | ||
15 | DLM_STATUS_CONVERT = 3, | ||
16 | }; | ||
17 | |||
18 | #define DLM_LOCK_DATA_VERSION 1 | ||
19 | |||
20 | struct dlm_lock_data { | ||
21 | uint16_t version; | ||
22 | uint32_t lockspace_id; | ||
23 | int nodeid; | ||
24 | int ownpid; | ||
25 | uint32_t id; | ||
26 | uint32_t remid; | ||
27 | uint64_t xid; | ||
28 | int8_t status; | ||
29 | int8_t grmode; | ||
30 | int8_t rqmode; | ||
31 | unsigned long timestamp; | ||
32 | int resource_namelen; | ||
33 | char resource_name[DLM_RESNAME_MAXLEN]; | ||
34 | }; | ||
35 | |||
36 | enum { | ||
37 | DLM_CMD_UNSPEC = 0, | ||
38 | DLM_CMD_HELLO, /* user->kernel */ | ||
39 | DLM_CMD_TIMEOUT, /* kernel->user */ | ||
40 | __DLM_CMD_MAX, | ||
41 | }; | ||
42 | |||
43 | #define DLM_CMD_MAX (__DLM_CMD_MAX - 1) | ||
44 | |||
45 | enum { | ||
46 | DLM_TYPE_UNSPEC = 0, | ||
47 | DLM_TYPE_LOCK, | ||
48 | __DLM_TYPE_MAX, | ||
49 | }; | ||
50 | |||
51 | #define DLM_TYPE_MAX (__DLM_TYPE_MAX - 1) | ||
52 | |||
53 | #define DLM_GENL_VERSION 0x1 | ||
54 | #define DLM_GENL_NAME "DLM" | ||
55 | |||
56 | #endif /* _DLM_NETLINK_H */ | ||