![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 0002 /****************************************************************************** 0003 ******************************************************************************* 0004 ** 0005 ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. 0006 ** Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved. 0007 ** 0008 ** This copyrighted material is made available to anyone wishing to use, 0009 ** modify, copy, or redistribute it subject to the terms and conditions 0010 ** of the GNU General Public License v.2. 0011 ** 0012 ******************************************************************************* 0013 ******************************************************************************/ 0014 0015 #ifndef _UAPI__DLM_DOT_H__ 0016 #define _UAPI__DLM_DOT_H__ 0017 0018 /* 0019 * Interface to Distributed Lock Manager (DLM) 0020 * routines and structures to use DLM lockspaces 0021 */ 0022 0023 /* Lock levels and flags are here */ 0024 #include <linux/dlmconstants.h> 0025 #include <linux/types.h> 0026 0027 typedef void dlm_lockspace_t; 0028 0029 /* 0030 * Lock status block 0031 * 0032 * Use this structure to specify the contents of the lock value block. For a 0033 * conversion request, this structure is used to specify the lock ID of the 0034 * lock. DLM writes the status of the lock request and the lock ID assigned 0035 * to the request in the lock status block. 0036 * 0037 * sb_lkid: the returned lock ID. It is set on new (non-conversion) requests. 0038 * It is available when dlm_lock returns. 0039 * 0040 * sb_lvbptr: saves or returns the contents of the lock's LVB according to rules 0041 * shown for the DLM_LKF_VALBLK flag. 0042 * 0043 * sb_flags: DLM_SBF_DEMOTED is returned if in the process of promoting a lock, 0044 * it was first demoted to NL to avoid conversion deadlock. 0045 * DLM_SBF_VALNOTVALID is returned if the resource's LVB is marked invalid. 0046 * 0047 * sb_status: the returned status of the lock request set prior to AST 0048 * execution. Possible return values: 0049 * 0050 * 0 if lock request was successful 0051 * -EAGAIN if request would block and is flagged DLM_LKF_NOQUEUE 0052 * -DLM_EUNLOCK if unlock request was successful 0053 * -DLM_ECANCEL if a cancel completed successfully 0054 * -EDEADLK if a deadlock was detected 0055 * -ETIMEDOUT if the lock request was canceled due to a timeout 0056 */ 0057 0058 #define DLM_SBF_DEMOTED 0x01 0059 #define DLM_SBF_VALNOTVALID 0x02 0060 #define DLM_SBF_ALTMODE 0x04 0061 0062 struct dlm_lksb { 0063 int sb_status; 0064 __u32 sb_lkid; 0065 char sb_flags; 0066 char * sb_lvbptr; 0067 }; 0068 0069 /* dlm_new_lockspace() flags */ 0070 0071 #define DLM_LSFL_TIMEWARN 0x00000002 0072 #define DLM_LSFL_FS 0x00000004 0073 #define DLM_LSFL_NEWEXCL 0x00000008 0074 0075 0076 #endif /* _UAPI__DLM_DOT_H__ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |