]>
git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blob - include/uapi/linux/dlm.h
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 /******************************************************************************
3 *******************************************************************************
5 ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
6 ** Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
8 ** This copyrighted material is made available to anyone wishing to use,
9 ** modify, copy, or redistribute it subject to the terms and conditions
10 ** of the GNU General Public License v.2.
12 *******************************************************************************
13 ******************************************************************************/
15 #ifndef _UAPI__DLM_DOT_H__
16 #define _UAPI__DLM_DOT_H__
19 * Interface to Distributed Lock Manager (DLM)
20 * routines and structures to use DLM lockspaces
23 /* Lock levels and flags are here */
24 #include <linux/dlmconstants.h>
25 #include <linux/types.h>
27 typedef void dlm_lockspace_t
;
32 * Use this structure to specify the contents of the lock value block. For a
33 * conversion request, this structure is used to specify the lock ID of the
34 * lock. DLM writes the status of the lock request and the lock ID assigned
35 * to the request in the lock status block.
37 * sb_lkid: the returned lock ID. It is set on new (non-conversion) requests.
38 * It is available when dlm_lock returns.
40 * sb_lvbptr: saves or returns the contents of the lock's LVB according to rules
41 * shown for the DLM_LKF_VALBLK flag.
43 * sb_flags: DLM_SBF_DEMOTED is returned if in the process of promoting a lock,
44 * it was first demoted to NL to avoid conversion deadlock.
45 * DLM_SBF_VALNOTVALID is returned if the resource's LVB is marked invalid.
47 * sb_status: the returned status of the lock request set prior to AST
48 * execution. Possible return values:
50 * 0 if lock request was successful
51 * -EAGAIN if request would block and is flagged DLM_LKF_NOQUEUE
52 * -DLM_EUNLOCK if unlock request was successful
53 * -DLM_ECANCEL if a cancel completed successfully
54 * -EDEADLK if a deadlock was detected
55 * -ETIMEDOUT if the lock request was canceled due to a timeout
58 #define DLM_SBF_DEMOTED 0x01
59 #define DLM_SBF_VALNOTVALID 0x02
60 #define DLM_SBF_ALTMODE 0x04
69 /* dlm_new_lockspace() flags */
71 #define DLM_LSFL_TIMEWARN 0x00000002
72 #define DLM_LSFL_FS 0x00000004
73 #define DLM_LSFL_NEWEXCL 0x00000008
76 #endif /* _UAPI__DLM_DOT_H__ */