blob: 0c655fa34804f12ae5bc5c0a10f56d5ddb983df4 [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 _DLM_NETLINK_H
20#define _DLM_NETLINK_H
21#include <linux/types.h>
Christopher Ferris1308ad32017-11-14 17:32:13 -080022#include <linux/dlmconstants.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070023enum {
Tao Baod7db5942015-01-28 10:07:51 -080024 DLM_STATUS_WAITING = 1,
25 DLM_STATUS_GRANTED = 2,
26 DLM_STATUS_CONVERT = 3,
Ben Cheng655a7c02013-10-16 16:09:24 -070027};
Ben Cheng655a7c02013-10-16 16:09:24 -070028#define DLM_LOCK_DATA_VERSION 1
29struct dlm_lock_data {
Tao Baod7db5942015-01-28 10:07:51 -080030 __u16 version;
31 __u32 lockspace_id;
Tao Baod7db5942015-01-28 10:07:51 -080032 int nodeid;
33 int ownpid;
34 __u32 id;
35 __u32 remid;
Tao Baod7db5942015-01-28 10:07:51 -080036 __u64 xid;
37 __s8 status;
38 __s8 grmode;
39 __s8 rqmode;
Tao Baod7db5942015-01-28 10:07:51 -080040 unsigned long timestamp;
41 int resource_namelen;
42 char resource_name[DLM_RESNAME_MAXLEN];
Ben Cheng655a7c02013-10-16 16:09:24 -070043};
Ben Cheng655a7c02013-10-16 16:09:24 -070044enum {
Tao Baod7db5942015-01-28 10:07:51 -080045 DLM_CMD_UNSPEC = 0,
46 DLM_CMD_HELLO,
47 DLM_CMD_TIMEOUT,
Tao Baod7db5942015-01-28 10:07:51 -080048 __DLM_CMD_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -070049};
50#define DLM_CMD_MAX (__DLM_CMD_MAX - 1)
51enum {
Tao Baod7db5942015-01-28 10:07:51 -080052 DLM_TYPE_UNSPEC = 0,
53 DLM_TYPE_LOCK,
54 __DLM_TYPE_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -070055};
Ben Cheng655a7c02013-10-16 16:09:24 -070056#define DLM_TYPE_MAX (__DLM_TYPE_MAX - 1)
57#define DLM_GENL_VERSION 0x1
58#define DLM_GENL_NAME "DLM"
59#endif