diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:44:49 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:49 +0300 |
commit | 718c552901d703c502ccbefdfc3c9028d608b947 (patch) | |
tree | 46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /contrib/libs/linux-headers/linux/dlm_device.h | |
parent | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff) | |
download | ydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/linux-headers/linux/dlm_device.h')
-rw-r--r-- | contrib/libs/linux-headers/linux/dlm_device.h | 218 |
1 files changed, 109 insertions, 109 deletions
diff --git a/contrib/libs/linux-headers/linux/dlm_device.h b/contrib/libs/linux-headers/linux/dlm_device.h index 09b2ed9301..993ca64668 100644 --- a/contrib/libs/linux-headers/linux/dlm_device.h +++ b/contrib/libs/linux-headers/linux/dlm_device.h @@ -1,109 +1,109 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/****************************************************************************** -******************************************************************************* -** -** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. -** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. -** -** This copyrighted material is made available to anyone wishing to use, -** modify, copy, or redistribute it subject to the terms and conditions -** of the GNU General Public License v.2. -** -******************************************************************************* -******************************************************************************/ - -#ifndef _LINUX_DLM_DEVICE_H -#define _LINUX_DLM_DEVICE_H - -/* This is the device interface for dlm, most users will use a library - * interface. - */ - -#include <linux/dlm.h> -#include <linux/types.h> - -#define DLM_USER_LVB_LEN 32 - -/* Version of the device interface */ -#define DLM_DEVICE_VERSION_MAJOR 6 -#define DLM_DEVICE_VERSION_MINOR 0 -#define DLM_DEVICE_VERSION_PATCH 2 - -/* struct passed to the lock write */ -struct dlm_lock_params { - __u8 mode; - __u8 namelen; - __u16 unused; - __u32 flags; - __u32 lkid; - __u32 parent; - __u64 xid; - __u64 timeout; - void *castparam; - void *castaddr; - void *bastparam; - void *bastaddr; - struct dlm_lksb *lksb; - char lvb[DLM_USER_LVB_LEN]; - char name[0]; -}; - -struct dlm_lspace_params { - __u32 flags; - __u32 minor; - char name[0]; -}; - -struct dlm_purge_params { - __u32 nodeid; - __u32 pid; -}; - -struct dlm_write_request { - __u32 version[3]; - __u8 cmd; - __u8 is64bit; - __u8 unused[2]; - - union { - struct dlm_lock_params lock; - struct dlm_lspace_params lspace; - struct dlm_purge_params purge; - } i; -}; - -struct dlm_device_version { - __u32 version[3]; -}; - -/* struct read from the "device" fd, - consists mainly of userspace pointers for the library to use */ - -struct dlm_lock_result { - __u32 version[3]; - __u32 length; - void * user_astaddr; - void * user_astparam; - struct dlm_lksb * user_lksb; - struct dlm_lksb lksb; - __u8 bast_mode; - __u8 unused[3]; - /* Offsets may be zero if no data is present */ - __u32 lvb_offset; -}; - -/* Commands passed to the device */ -#define DLM_USER_LOCK 1 -#define DLM_USER_UNLOCK 2 -#define DLM_USER_QUERY 3 -#define DLM_USER_CREATE_LOCKSPACE 4 -#define DLM_USER_REMOVE_LOCKSPACE 5 -#define DLM_USER_PURGE 6 -#define DLM_USER_DEADLOCK 7 - -/* Lockspace flags */ -#define DLM_USER_LSFLG_AUTOFREE 1 -#define DLM_USER_LSFLG_FORCEFREE 2 - -#endif - +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/****************************************************************************** +******************************************************************************* +** +** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. +** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. +** +** This copyrighted material is made available to anyone wishing to use, +** modify, copy, or redistribute it subject to the terms and conditions +** of the GNU General Public License v.2. +** +******************************************************************************* +******************************************************************************/ + +#ifndef _LINUX_DLM_DEVICE_H +#define _LINUX_DLM_DEVICE_H + +/* This is the device interface for dlm, most users will use a library + * interface. + */ + +#include <linux/dlm.h> +#include <linux/types.h> + +#define DLM_USER_LVB_LEN 32 + +/* Version of the device interface */ +#define DLM_DEVICE_VERSION_MAJOR 6 +#define DLM_DEVICE_VERSION_MINOR 0 +#define DLM_DEVICE_VERSION_PATCH 2 + +/* struct passed to the lock write */ +struct dlm_lock_params { + __u8 mode; + __u8 namelen; + __u16 unused; + __u32 flags; + __u32 lkid; + __u32 parent; + __u64 xid; + __u64 timeout; + void *castparam; + void *castaddr; + void *bastparam; + void *bastaddr; + struct dlm_lksb *lksb; + char lvb[DLM_USER_LVB_LEN]; + char name[0]; +}; + +struct dlm_lspace_params { + __u32 flags; + __u32 minor; + char name[0]; +}; + +struct dlm_purge_params { + __u32 nodeid; + __u32 pid; +}; + +struct dlm_write_request { + __u32 version[3]; + __u8 cmd; + __u8 is64bit; + __u8 unused[2]; + + union { + struct dlm_lock_params lock; + struct dlm_lspace_params lspace; + struct dlm_purge_params purge; + } i; +}; + +struct dlm_device_version { + __u32 version[3]; +}; + +/* struct read from the "device" fd, + consists mainly of userspace pointers for the library to use */ + +struct dlm_lock_result { + __u32 version[3]; + __u32 length; + void * user_astaddr; + void * user_astparam; + struct dlm_lksb * user_lksb; + struct dlm_lksb lksb; + __u8 bast_mode; + __u8 unused[3]; + /* Offsets may be zero if no data is present */ + __u32 lvb_offset; +}; + +/* Commands passed to the device */ +#define DLM_USER_LOCK 1 +#define DLM_USER_UNLOCK 2 +#define DLM_USER_QUERY 3 +#define DLM_USER_CREATE_LOCKSPACE 4 +#define DLM_USER_REMOVE_LOCKSPACE 5 +#define DLM_USER_PURGE 6 +#define DLM_USER_DEADLOCK 7 + +/* Lockspace flags */ +#define DLM_USER_LSFLG_AUTOFREE 1 +#define DLM_USER_LSFLG_FORCEFREE 2 + +#endif + |