1 /* 2 * This file is auto-generated. Modifications will be lost. 3 * 4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ 5 * for more information. 6 */ 7 #ifndef _UAPI_BLKZONED_H 8 #define _UAPI_BLKZONED_H 9 #include <linux/types.h> 10 #include <linux/ioctl.h> 11 enum blk_zone_type { 12 BLK_ZONE_TYPE_CONVENTIONAL = 0x1, 13 BLK_ZONE_TYPE_SEQWRITE_REQ = 0x2, 14 BLK_ZONE_TYPE_SEQWRITE_PREF = 0x3, 15 }; 16 enum blk_zone_cond { 17 BLK_ZONE_COND_NOT_WP = 0x0, 18 BLK_ZONE_COND_EMPTY = 0x1, 19 BLK_ZONE_COND_IMP_OPEN = 0x2, 20 BLK_ZONE_COND_EXP_OPEN = 0x3, 21 BLK_ZONE_COND_CLOSED = 0x4, 22 BLK_ZONE_COND_READONLY = 0xD, 23 BLK_ZONE_COND_FULL = 0xE, 24 BLK_ZONE_COND_OFFLINE = 0xF, 25 }; 26 enum blk_zone_report_flags { 27 BLK_ZONE_REP_CAPACITY = (1 << 0), 28 }; 29 struct blk_zone { 30 __u64 start; 31 __u64 len; 32 __u64 wp; 33 __u8 type; 34 __u8 cond; 35 __u8 non_seq; 36 __u8 reset; 37 __u8 resv[4]; 38 __u64 capacity; 39 __u8 reserved[24]; 40 }; 41 struct blk_zone_report { 42 __u64 sector; 43 __u32 nr_zones; 44 __u32 flags; 45 struct blk_zone zones[]; 46 }; 47 struct blk_zone_range { 48 __u64 sector; 49 __u64 nr_sectors; 50 }; 51 #define BLKREPORTZONE _IOWR(0x12, 130, struct blk_zone_report) 52 #define BLKRESETZONE _IOW(0x12, 131, struct blk_zone_range) 53 #define BLKGETZONESZ _IOR(0x12, 132, __u32) 54 #define BLKGETNRZONES _IOR(0x12, 133, __u32) 55 #define BLKOPENZONE _IOW(0x12, 134, struct blk_zone_range) 56 #define BLKCLOSEZONE _IOW(0x12, 135, struct blk_zone_range) 57 #define BLKFINISHZONE _IOW(0x12, 136, struct blk_zone_range) 58 #endif 59