122851890Sopenharmony_ci/**************************************************************************** 222851890Sopenharmony_ci **************************************************************************** 322851890Sopenharmony_ci *** 422851890Sopenharmony_ci *** This header was automatically generated from a Linux kernel header 522851890Sopenharmony_ci *** of the same name, to make information necessary for userspace to 622851890Sopenharmony_ci *** call into the kernel available to libc. It contains only constants, 722851890Sopenharmony_ci *** structures, and macros generated from the original header, and thus, 822851890Sopenharmony_ci *** contains no copyrightable information. 922851890Sopenharmony_ci *** 1022851890Sopenharmony_ci *** To edit the content of this header, modify the corresponding 1122851890Sopenharmony_ci *** source file (e.g. under external/kernel-headers/original/) then 1222851890Sopenharmony_ci *** run bionic/libc/kernel/tools/update_all.py 1322851890Sopenharmony_ci *** 1422851890Sopenharmony_ci *** Any manual change here will be lost the next time this script will 1522851890Sopenharmony_ci *** be run. You've been warned! 1622851890Sopenharmony_ci *** 1722851890Sopenharmony_ci **************************************************************************** 1822851890Sopenharmony_ci ****************************************************************************/ 1922851890Sopenharmony_ci#ifndef _UAPI_BLKZONED_H 2022851890Sopenharmony_ci#define _UAPI_BLKZONED_H 2122851890Sopenharmony_ci#include <linux/types.h> 2222851890Sopenharmony_ci#include <linux/ioctl.h> 2322851890Sopenharmony_cienum blk_zone_type { 2422851890Sopenharmony_ci BLK_ZONE_TYPE_CONVENTIONAL = 0x1, 2522851890Sopenharmony_ci BLK_ZONE_TYPE_SEQWRITE_REQ = 0x2, 2622851890Sopenharmony_ci BLK_ZONE_TYPE_SEQWRITE_PREF = 0x3, 2722851890Sopenharmony_ci}; 2822851890Sopenharmony_cienum blk_zone_cond { 2922851890Sopenharmony_ci BLK_ZONE_COND_NOT_WP = 0x0, 3022851890Sopenharmony_ci BLK_ZONE_COND_EMPTY = 0x1, 3122851890Sopenharmony_ci BLK_ZONE_COND_IMP_OPEN = 0x2, 3222851890Sopenharmony_ci BLK_ZONE_COND_EXP_OPEN = 0x3, 3322851890Sopenharmony_ci BLK_ZONE_COND_CLOSED = 0x4, 3422851890Sopenharmony_ci BLK_ZONE_COND_READONLY = 0xD, 3522851890Sopenharmony_ci BLK_ZONE_COND_FULL = 0xE, 3622851890Sopenharmony_ci BLK_ZONE_COND_OFFLINE = 0xF, 3722851890Sopenharmony_ci}; 3822851890Sopenharmony_cienum blk_zone_report_flags { 3922851890Sopenharmony_ci BLK_ZONE_REP_CAPACITY = (1 << 0), 4022851890Sopenharmony_ci}; 4122851890Sopenharmony_cistruct blk_zone { 4222851890Sopenharmony_ci __u64 start; 4322851890Sopenharmony_ci __u64 len; 4422851890Sopenharmony_ci __u64 wp; 4522851890Sopenharmony_ci __u8 type; 4622851890Sopenharmony_ci __u8 cond; 4722851890Sopenharmony_ci __u8 non_seq; 4822851890Sopenharmony_ci __u8 reset; 4922851890Sopenharmony_ci __u8 resv[4]; 5022851890Sopenharmony_ci __u64 capacity; 5122851890Sopenharmony_ci __u8 reserved[24]; 5222851890Sopenharmony_ci}; 5322851890Sopenharmony_cistruct blk_zone_report { 5422851890Sopenharmony_ci __u64 sector; 5522851890Sopenharmony_ci __u32 nr_zones; 5622851890Sopenharmony_ci __u32 flags; 5722851890Sopenharmony_ci struct blk_zone zones[0]; 5822851890Sopenharmony_ci}; 5922851890Sopenharmony_cistruct blk_zone_range { 6022851890Sopenharmony_ci __u64 sector; 6122851890Sopenharmony_ci __u64 nr_sectors; 6222851890Sopenharmony_ci}; 6322851890Sopenharmony_ci#define BLKREPORTZONE _IOWR(0x12, 130, struct blk_zone_report) 6422851890Sopenharmony_ci#define BLKRESETZONE _IOW(0x12, 131, struct blk_zone_range) 6522851890Sopenharmony_ci#define BLKGETZONESZ _IOR(0x12, 132, __u32) 6622851890Sopenharmony_ci#define BLKGETNRZONES _IOR(0x12, 133, __u32) 6722851890Sopenharmony_ci#define BLKOPENZONE _IOW(0x12, 134, struct blk_zone_range) 6822851890Sopenharmony_ci#define BLKCLOSEZONE _IOW(0x12, 135, struct blk_zone_range) 6922851890Sopenharmony_ci#define BLKFINISHZONE _IOW(0x12, 136, struct blk_zone_range) 7022851890Sopenharmony_ci#endif 71