Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


dlm_device.h
001: /******************************************************************************
002: *******************************************************************************
003: **
004: **  Copyright (C) Sistina Software, Inc.  1997-2003  All rights reserved.
005: **  Copyright (C) 2004-2007 Red Hat, Inc.  All rights reserved.
006: **
007: **  This copyrighted material is made available to anyone wishing to use,
008: **  modify, copy, or redistribute it subject to the terms and conditions
009: **  of the GNU General Public License v.2.
010: **
011: *******************************************************************************
012: ******************************************************************************/
013: 
014: #ifndef _LINUX_DLM_DEVICE_H
015: #define _LINUX_DLM_DEVICE_H
016: 
017: /* This is the device interface for dlm, most users will use a library
018:  * interface.
019:  */
020: 
021: #include <linux/dlm.h>
022: #include <linux/types.h>
023: 
024: #define DLM_USER_LVB_LEN        32
025: 
026: /* Version of the device interface */
027: #define DLM_DEVICE_VERSION_MAJOR 6
028: #define DLM_DEVICE_VERSION_MINOR 0
029: #define DLM_DEVICE_VERSION_PATCH 1
030: 
031: /* struct passed to the lock write */
032: struct dlm_lock_params {
033:         __u8 mode;
034:         __u8 namelen;
035:         __u16 unused;
036:         __u32 flags;
037:         __u32 lkid;
038:         __u32 parent;
039:         __u64 xid;
040:         __u64 timeout;
041:         void *castparam;
042:         void *castaddr;
043:         void *bastparam;
044:         void *bastaddr;
045:         struct dlm_lksb *lksb;
046:         char lvb[DLM_USER_LVB_LEN];
047:         char name[0];
048: };
049: 
050: struct dlm_lspace_params {
051:         __u32 flags;
052:         __u32 minor;
053:         char name[0];
054: };
055: 
056: struct dlm_purge_params {
057:         __u32 nodeid;
058:         __u32 pid;
059: };
060: 
061: struct dlm_write_request {
062:         __u32 version[3];
063:         __u8 cmd;
064:         __u8 is64bit;
065:         __u8 unused[2];
066: 
067:         union  {
068:                 struct dlm_lock_params   lock;
069:                 struct dlm_lspace_params lspace;
070:                 struct dlm_purge_params  purge;
071:         } i;
072: };
073: 
074: struct dlm_device_version {
075:         __u32 version[3];
076: };
077: 
078: /* struct read from the "device" fd,
079:    consists mainly of userspace pointers for the library to use */
080: 
081: struct dlm_lock_result {
082:         __u32 version[3];
083:         __u32 length;
084:         void * user_astaddr;
085:         void * user_astparam;
086:         struct dlm_lksb * user_lksb;
087:         struct dlm_lksb lksb;
088:         __u8 bast_mode;
089:         __u8 unused[3];
090:         /* Offsets may be zero if no data is present */
091:         __u32 lvb_offset;
092: };
093: 
094: /* Commands passed to the device */
095: #define DLM_USER_LOCK         1
096: #define DLM_USER_UNLOCK       2
097: #define DLM_USER_QUERY        3
098: #define DLM_USER_CREATE_LOCKSPACE  4
099: #define DLM_USER_REMOVE_LOCKSPACE  5
100: #define DLM_USER_PURGE        6
101: #define DLM_USER_DEADLOCK     7
102: 
103: /* Lockspace flags */
104: #define DLM_USER_LSFLG_AUTOFREE   1
105: #define DLM_USER_LSFLG_FORCEFREE  2
106: 
107: #endif
108: 
109: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/