1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux 1 2 /********************************************* 3 ********************************************** 4 ** 5 ** Copyright (C) Sistina Software, Inc. 1997 6 ** Copyright (C) 2004-2011 Red Hat, Inc. All 7 ** 8 ** This copyrighted material is made availabl 9 ** modify, copy, or redistribute it subject t 10 ** of the GNU General Public License v.2. 11 ** 12 ********************************************** 13 ********************************************** 14 15 #ifndef _UAPI__DLM_DOT_H__ 16 #define _UAPI__DLM_DOT_H__ 17 18 /* 19 * Interface to Distributed Lock Manager (DLM) 20 * routines and structures to use DLM lockspac 21 */ 22 23 /* Lock levels and flags are here */ 24 #include <linux/dlmconstants.h> 25 #include <linux/types.h> 26 27 typedef void dlm_lockspace_t; 28 29 /* 30 * Lock status block 31 * 32 * Use this structure to specify the contents 33 * conversion request, this structure is used 34 * lock. DLM writes the status of the lock re 35 * to the request in the lock status block. 36 * 37 * sb_lkid: the returned lock ID. It is set o 38 * It is available when dlm_lock returns. 39 * 40 * sb_lvbptr: saves or returns the contents of 41 * shown for the DLM_LKF_VALBLK flag. 42 * 43 * sb_flags: DLM_SBF_DEMOTED is returned if in 44 * it was first demoted to NL to avoid convers 45 * DLM_SBF_VALNOTVALID is returned if the reso 46 * 47 * sb_status: the returned status of the lock 48 * execution. Possible return values: 49 * 50 * 0 if lock request was successful 51 * -EAGAIN if request would block and is flagg 52 * -DLM_EUNLOCK if unlock request was successf 53 * -DLM_ECANCEL if a cancel completed successf 54 * -EDEADLK if a deadlock was detected 55 * -ETIMEDOUT if the lock request was canceled 56 */ 57 58 #define DLM_SBF_DEMOTED 0x01 59 #define DLM_SBF_VALNOTVALID 0x02 60 #define DLM_SBF_ALTMODE 0x04 61 62 struct dlm_lksb { 63 int sb_status; 64 __u32 sb_lkid; 65 char sb_flags; 66 char * sb_lvbptr; 67 }; 68 69 /* dlm_new_lockspace() flags */ 70 71 /* DLM_LSFL_TIMEWARN is deprecated and reserve 72 #define DLM_LSFL_TIMEWARN 0x00000002 73 #define DLM_LSFL_NEWEXCL 0x00000008 74 /* currently reserved due in-kernel use */ 75 #define __DLM_LSFL_RESERVED0 0x00000010 76 77 78 #endif /* _UAPI__DLM_DOT_H__ */ 79
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.