]>
git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - include/linux/dlm_device.h
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 #ifndef _LINUX_DLM_DEVICE_H
15 #define _LINUX_DLM_DEVICE_H
17 /* This is the device interface for dlm, most users will use a library
21 #include <linux/dlm.h>
22 #include <linux/types.h>
24 #define DLM_USER_LVB_LEN 32
26 /* Version of the device interface */
27 #define DLM_DEVICE_VERSION_MAJOR 6
28 #define DLM_DEVICE_VERSION_MINOR 0
29 #define DLM_DEVICE_VERSION_PATCH 1
31 /* struct passed to the lock write */
32 struct dlm_lock_params
{
41 void __user
*castparam
;
42 void __user
*castaddr
;
43 void __user
*bastparam
;
44 void __user
*bastaddr
;
45 struct dlm_lksb __user
*lksb
;
46 char lvb
[DLM_USER_LVB_LEN
];
50 struct dlm_lspace_params
{
56 struct dlm_purge_params
{
61 struct dlm_write_request
{
68 struct dlm_lock_params lock
;
69 struct dlm_lspace_params lspace
;
70 struct dlm_purge_params purge
;
74 struct dlm_device_version
{
78 /* struct read from the "device" fd,
79 consists mainly of userspace pointers for the library to use */
81 struct dlm_lock_result
{
84 void __user
* user_astaddr
;
85 void __user
* user_astparam
;
86 struct dlm_lksb __user
* user_lksb
;
90 /* Offsets may be zero if no data is present */
94 /* Commands passed to the device */
95 #define DLM_USER_LOCK 1
96 #define DLM_USER_UNLOCK 2
97 #define DLM_USER_QUERY 3
98 #define DLM_USER_CREATE_LOCKSPACE 4
99 #define DLM_USER_REMOVE_LOCKSPACE 5
100 #define DLM_USER_PURGE 6
101 #define DLM_USER_DEADLOCK 7
103 /* Lockspace flags */
104 #define DLM_USER_LSFLG_AUTOFREE 1
105 #define DLM_USER_LSFLG_FORCEFREE 2