Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 /*
0003  * Copyright (C) 2007 Red Hat, Inc.  All rights reserved.
0004  *
0005  * This copyrighted material is made available to anyone wishing to use,
0006  * modify, copy, or redistribute it subject to the terms and conditions
0007  * of the GNU General Public License v.2.
0008  */
0009 
0010 #ifndef _DLM_NETLINK_H
0011 #define _DLM_NETLINK_H
0012 
0013 #include <linux/types.h>
0014 #include <linux/dlmconstants.h>
0015 
0016 enum {
0017     DLM_STATUS_WAITING = 1,
0018     DLM_STATUS_GRANTED = 2,
0019     DLM_STATUS_CONVERT = 3,
0020 };
0021 
0022 #define DLM_LOCK_DATA_VERSION 1
0023 
0024 struct dlm_lock_data {
0025     __u16 version;
0026     __u32 lockspace_id;
0027     int nodeid;
0028     int ownpid;
0029     __u32 id;
0030     __u32 remid;
0031     __u64 xid;
0032     __s8 status;
0033     __s8 grmode;
0034     __s8 rqmode;
0035     unsigned long timestamp;
0036     int resource_namelen;
0037     char resource_name[DLM_RESNAME_MAXLEN];
0038 };
0039 
0040 enum {
0041     DLM_CMD_UNSPEC = 0,
0042     DLM_CMD_HELLO,      /* user->kernel */
0043     DLM_CMD_TIMEOUT,    /* kernel->user */
0044     __DLM_CMD_MAX,
0045 };
0046 
0047 #define DLM_CMD_MAX (__DLM_CMD_MAX - 1)
0048 
0049 enum {
0050     DLM_TYPE_UNSPEC = 0,
0051     DLM_TYPE_LOCK,
0052     __DLM_TYPE_MAX,
0053 };
0054 
0055 #define DLM_TYPE_MAX (__DLM_TYPE_MAX - 1)
0056 
0057 #define DLM_GENL_VERSION 0x1
0058 #define DLM_GENL_NAME "DLM"
0059 
0060 #endif /* _DLM_NETLINK_H */