1 /******************************************************************************
2 *******************************************************************************
4 ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
5 ** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
7 ** This copyrighted material is made available to anyone wishing to use,
8 ** modify, copy, or redistribute it subject to the terms and conditions
9 ** of the GNU General Public License v.2.
11 *******************************************************************************
12 ******************************************************************************/
14 /* This is the device interface for dlm, most users will use a library
18 #define DLM_USER_LVB_LEN 32
20 /* Version of the device interface */
21 #define DLM_DEVICE_VERSION_MAJOR 6
22 #define DLM_DEVICE_VERSION_MINOR 0
23 #define DLM_DEVICE_VERSION_PATCH 0
25 /* struct passed to the lock write */
26 struct dlm_lock_params
{
35 void __user
*castparam
;
36 void __user
*castaddr
;
37 void __user
*bastparam
;
38 void __user
*bastaddr
;
39 struct dlm_lksb __user
*lksb
;
40 char lvb
[DLM_USER_LVB_LEN
];
44 struct dlm_lspace_params
{
50 struct dlm_purge_params
{
55 struct dlm_write_request
{
62 struct dlm_lock_params lock
;
63 struct dlm_lspace_params lspace
;
64 struct dlm_purge_params purge
;
68 struct dlm_device_version
{
72 /* struct read from the "device" fd,
73 consists mainly of userspace pointers for the library to use */
75 struct dlm_lock_result
{
78 void __user
* user_astaddr
;
79 void __user
* user_astparam
;
80 struct dlm_lksb __user
* user_lksb
;
84 /* Offsets may be zero if no data is present */
88 /* Commands passed to the device */
89 #define DLM_USER_LOCK 1
90 #define DLM_USER_UNLOCK 2
91 #define DLM_USER_QUERY 3
92 #define DLM_USER_CREATE_LOCKSPACE 4
93 #define DLM_USER_REMOVE_LOCKSPACE 5
94 #define DLM_USER_PURGE 6
95 #define DLM_USER_DEADLOCK 7
97 /* Arbitrary length restriction */
98 #define MAX_LS_NAME_LEN 64
100 /* Lockspace flags */
101 #define DLM_USER_LSFLG_AUTOFREE 1
102 #define DLM_USER_LSFLG_FORCEFREE 2