Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame] | 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_DM_USER_H |
| 20 | #define _LINUX_DM_USER_H |
| 21 | #include <linux/types.h> |
| 22 | #define DM_USER_REQ_MAP_READ 0 |
| 23 | #define DM_USER_REQ_MAP_WRITE 1 |
| 24 | #define DM_USER_REQ_MAP_FLUSH 2 |
| 25 | #define DM_USER_REQ_MAP_DISCARD 3 |
| 26 | #define DM_USER_REQ_MAP_SECURE_ERASE 4 |
| 27 | #define DM_USER_REQ_MAP_WRITE_SAME 5 |
| 28 | #define DM_USER_REQ_MAP_WRITE_ZEROES 6 |
| 29 | #define DM_USER_REQ_MAP_ZONE_OPEN 7 |
| 30 | #define DM_USER_REQ_MAP_ZONE_CLOSE 8 |
| 31 | #define DM_USER_REQ_MAP_ZONE_FINISH 9 |
| 32 | #define DM_USER_REQ_MAP_ZONE_APPEND 10 |
| 33 | #define DM_USER_REQ_MAP_ZONE_RESET 11 |
| 34 | #define DM_USER_REQ_MAP_ZONE_RESET_ALL 12 |
| 35 | #define DM_USER_REQ_MAP_FLAG_FAILFAST_DEV 0x00001 |
| 36 | #define DM_USER_REQ_MAP_FLAG_FAILFAST_TRANSPORT 0x00002 |
| 37 | #define DM_USER_REQ_MAP_FLAG_FAILFAST_DRIVER 0x00004 |
| 38 | #define DM_USER_REQ_MAP_FLAG_SYNC 0x00008 |
| 39 | #define DM_USER_REQ_MAP_FLAG_META 0x00010 |
| 40 | #define DM_USER_REQ_MAP_FLAG_PRIO 0x00020 |
| 41 | #define DM_USER_REQ_MAP_FLAG_NOMERGE 0x00040 |
| 42 | #define DM_USER_REQ_MAP_FLAG_IDLE 0x00080 |
| 43 | #define DM_USER_REQ_MAP_FLAG_INTEGRITY 0x00100 |
| 44 | #define DM_USER_REQ_MAP_FLAG_FUA 0x00200 |
| 45 | #define DM_USER_REQ_MAP_FLAG_PREFLUSH 0x00400 |
| 46 | #define DM_USER_REQ_MAP_FLAG_RAHEAD 0x00800 |
| 47 | #define DM_USER_REQ_MAP_FLAG_BACKGROUND 0x01000 |
| 48 | #define DM_USER_REQ_MAP_FLAG_NOWAIT 0x02000 |
| 49 | #define DM_USER_REQ_MAP_FLAG_CGROUP_PUNT 0x04000 |
| 50 | #define DM_USER_REQ_MAP_FLAG_NOUNMAP 0x08000 |
| 51 | #define DM_USER_REQ_MAP_FLAG_HIPRI 0x10000 |
| 52 | #define DM_USER_REQ_MAP_FLAG_DRV 0x20000 |
| 53 | #define DM_USER_REQ_MAP_FLAG_SWAP 0x40000 |
| 54 | #define DM_USER_RESP_SUCCESS 0 |
| 55 | #define DM_USER_RESP_ERROR 1 |
| 56 | #define DM_USER_RESP_UNSUPPORTED 2 |
| 57 | struct dm_user_message { |
| 58 | __u64 seq; |
| 59 | __u64 type; |
| 60 | __u64 flags; |
| 61 | __u64 sector; |
| 62 | __u64 len; |
| 63 | __u8 buf[]; |
| 64 | }; |
| 65 | #endif |