Home | History | Annotate | Download | only in linux
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ***   To edit the content of this header, modify the corresponding
     11  ***   source file (e.g. under external/kernel-headers/original/) then
     12  ***   run bionic/libc/kernel/tools/update_all.py
     13  ***
     14  ***   Any manual change here will be lost the next time this script will
     15  ***   be run. You've been warned!
     16  ***
     17  ****************************************************************************
     18  ****************************************************************************/
     19 #ifndef _LINUX_DLM_DEVICE_H
     20 #define _LINUX_DLM_DEVICE_H
     21 #include <linux/dlm.h>
     22 #include <linux/types.h>
     23 #define DLM_USER_LVB_LEN 32
     24 #define DLM_DEVICE_VERSION_MAJOR 6
     25 #define DLM_DEVICE_VERSION_MINOR 0
     26 #define DLM_DEVICE_VERSION_PATCH 2
     27 struct dlm_lock_params {
     28   __u8 mode;
     29   __u8 namelen;
     30   __u16 unused;
     31   __u32 flags;
     32   __u32 lkid;
     33   __u32 parent;
     34   __u64 xid;
     35   __u64 timeout;
     36   void __user * castparam;
     37   void __user * castaddr;
     38   void __user * bastparam;
     39   void __user * bastaddr;
     40   struct dlm_lksb __user * lksb;
     41   char lvb[DLM_USER_LVB_LEN];
     42   char name[0];
     43 };
     44 struct dlm_lspace_params {
     45   __u32 flags;
     46   __u32 minor;
     47   char name[0];
     48 };
     49 struct dlm_purge_params {
     50   __u32 nodeid;
     51   __u32 pid;
     52 };
     53 struct dlm_write_request {
     54   __u32 version[3];
     55   __u8 cmd;
     56   __u8 is64bit;
     57   __u8 unused[2];
     58   union {
     59     struct dlm_lock_params lock;
     60     struct dlm_lspace_params lspace;
     61     struct dlm_purge_params purge;
     62   } i;
     63 };
     64 struct dlm_device_version {
     65   __u32 version[3];
     66 };
     67 struct dlm_lock_result {
     68   __u32 version[3];
     69   __u32 length;
     70   void __user * user_astaddr;
     71   void __user * user_astparam;
     72   struct dlm_lksb __user * user_lksb;
     73   struct dlm_lksb lksb;
     74   __u8 bast_mode;
     75   __u8 unused[3];
     76   __u32 lvb_offset;
     77 };
     78 #define DLM_USER_LOCK 1
     79 #define DLM_USER_UNLOCK 2
     80 #define DLM_USER_QUERY 3
     81 #define DLM_USER_CREATE_LOCKSPACE 4
     82 #define DLM_USER_REMOVE_LOCKSPACE 5
     83 #define DLM_USER_PURGE 6
     84 #define DLM_USER_DEADLOCK 7
     85 #define DLM_USER_LSFLG_AUTOFREE 1
     86 #define DLM_USER_LSFLG_FORCEFREE 2
     87 #endif
     88