blkzoned.h revision 48af7cb2e205dcc2f09a1a1b8a1a37c93e1943f0
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 _UAPI_BLKZONED_H 20#define _UAPI_BLKZONED_H 21#include <linux/types.h> 22#include <linux/ioctl.h> 23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24enum blk_zone_type { 25 BLK_ZONE_TYPE_CONVENTIONAL = 0x1, 26 BLK_ZONE_TYPE_SEQWRITE_REQ = 0x2, 27 BLK_ZONE_TYPE_SEQWRITE_PREF = 0x3, 28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29}; 30enum blk_zone_cond { 31 BLK_ZONE_COND_NOT_WP = 0x0, 32 BLK_ZONE_COND_EMPTY = 0x1, 33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 BLK_ZONE_COND_IMP_OPEN = 0x2, 35 BLK_ZONE_COND_EXP_OPEN = 0x3, 36 BLK_ZONE_COND_CLOSED = 0x4, 37 BLK_ZONE_COND_READONLY = 0xD, 38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 BLK_ZONE_COND_FULL = 0xE, 40 BLK_ZONE_COND_OFFLINE = 0xF, 41}; 42struct blk_zone { 43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 __u64 start; 45 __u64 len; 46 __u64 wp; 47 __u8 type; 48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 __u8 cond; 50 __u8 non_seq; 51 __u8 reset; 52 __u8 reserved[36]; 53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54}; 55struct blk_zone_report { 56 __u64 sector; 57 __u32 nr_zones; 58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 __u8 reserved[4]; 60 struct blk_zone zones[0]; 61} __packed; 62struct blk_zone_range { 63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 __u64 sector; 65 __u64 nr_sectors; 66}; 67#define BLKREPORTZONE _IOWR(0x12, 130, struct blk_zone_report) 68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69#define BLKRESETZONE _IOW(0x12, 131, struct blk_zone_range) 70#endif 71