blob: e1b0c6d7284a01d12dffd5f04f9d7e0d302f23a2 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _LINUX_DLM_DEVICE_H
20#define _LINUX_DLM_DEVICE_H
21#include <linux/dlm.h>
22#include <linux/types.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define DLM_USER_LVB_LEN 32
24#define DLM_DEVICE_VERSION_MAJOR 6
25#define DLM_DEVICE_VERSION_MINOR 0
Christopher Ferris05d08e92016-02-04 13:16:38 -080026#define DLM_DEVICE_VERSION_PATCH 2
Ben Cheng655a7c02013-10-16 16:09:24 -070027struct dlm_lock_params {
Tao Baod7db5942015-01-28 10:07:51 -080028 __u8 mode;
29 __u8 namelen;
30 __u16 unused;
Tao Baod7db5942015-01-28 10:07:51 -080031 __u32 flags;
32 __u32 lkid;
33 __u32 parent;
34 __u64 xid;
Tao Baod7db5942015-01-28 10:07:51 -080035 __u64 timeout;
Elliott Hughes0f0c18f2023-03-29 15:53:31 -070036 void * castparam;
37 void * castaddr;
38 void * bastparam;
39 void * bastaddr;
40 struct dlm_lksb * lksb;
Tao Baod7db5942015-01-28 10:07:51 -080041 char lvb[DLM_USER_LVB_LEN];
Christopher Ferrisa4792612022-01-10 13:51:15 -080042 char name[];
Ben Cheng655a7c02013-10-16 16:09:24 -070043};
44struct dlm_lspace_params {
Tao Baod7db5942015-01-28 10:07:51 -080045 __u32 flags;
46 __u32 minor;
Christopher Ferrisa4792612022-01-10 13:51:15 -080047 char name[];
Ben Cheng655a7c02013-10-16 16:09:24 -070048};
49struct dlm_purge_params {
Tao Baod7db5942015-01-28 10:07:51 -080050 __u32 nodeid;
Tao Baod7db5942015-01-28 10:07:51 -080051 __u32 pid;
Ben Cheng655a7c02013-10-16 16:09:24 -070052};
53struct dlm_write_request {
Tao Baod7db5942015-01-28 10:07:51 -080054 __u32 version[3];
Tao Baod7db5942015-01-28 10:07:51 -080055 __u8 cmd;
56 __u8 is64bit;
57 __u8 unused[2];
58 union {
Tao Baod7db5942015-01-28 10:07:51 -080059 struct dlm_lock_params lock;
60 struct dlm_lspace_params lspace;
61 struct dlm_purge_params purge;
62 } i;
Ben Cheng655a7c02013-10-16 16:09:24 -070063};
64struct dlm_device_version {
Tao Baod7db5942015-01-28 10:07:51 -080065 __u32 version[3];
Ben Cheng655a7c02013-10-16 16:09:24 -070066};
Ben Cheng655a7c02013-10-16 16:09:24 -070067struct dlm_lock_result {
Tao Baod7db5942015-01-28 10:07:51 -080068 __u32 version[3];
69 __u32 length;
Elliott Hughes0f0c18f2023-03-29 15:53:31 -070070 void * user_astaddr;
71 void * user_astparam;
72 struct dlm_lksb * user_lksb;
Tao Baod7db5942015-01-28 10:07:51 -080073 struct dlm_lksb lksb;
74 __u8 bast_mode;
Tao Baod7db5942015-01-28 10:07:51 -080075 __u8 unused[3];
76 __u32 lvb_offset;
Ben Cheng655a7c02013-10-16 16:09:24 -070077};
78#define DLM_USER_LOCK 1
Ben Cheng655a7c02013-10-16 16:09:24 -070079#define DLM_USER_UNLOCK 2
80#define DLM_USER_QUERY 3
81#define DLM_USER_CREATE_LOCKSPACE 4
82#define DLM_USER_REMOVE_LOCKSPACE 5
Ben Cheng655a7c02013-10-16 16:09:24 -070083#define DLM_USER_PURGE 6
84#define DLM_USER_DEADLOCK 7
85#define DLM_USER_LSFLG_AUTOFREE 1
86#define DLM_USER_LSFLG_FORCEFREE 2
Ben Cheng655a7c02013-10-16 16:09:24 -070087#endif