• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This header was generated from the Linux kernel headers by update_headers.py,
3  * to provide necessary information from kernel to userspace, such as constants,
4  * structures, and macros, and thus, contains no copyrightable information.
5  */
6 #ifndef _UAPI_BLKZONED_H
7 #define _UAPI_BLKZONED_H
8 #include <linux/types.h>
9 #include <linux/ioctl.h>
10 enum blk_zone_type {
11 	BLK_ZONE_TYPE_CONVENTIONAL	= 0x1,
12 	BLK_ZONE_TYPE_SEQWRITE_REQ	= 0x2,
13 	BLK_ZONE_TYPE_SEQWRITE_PREF	= 0x3,
14 };
15 enum blk_zone_cond {
16 	BLK_ZONE_COND_NOT_WP	= 0x0,
17 	BLK_ZONE_COND_EMPTY	= 0x1,
18 	BLK_ZONE_COND_IMP_OPEN	= 0x2,
19 	BLK_ZONE_COND_EXP_OPEN	= 0x3,
20 	BLK_ZONE_COND_CLOSED	= 0x4,
21 	BLK_ZONE_COND_READONLY	= 0xD,
22 	BLK_ZONE_COND_FULL	= 0xE,
23 	BLK_ZONE_COND_OFFLINE	= 0xF,
24 };
25 struct blk_zone {
26 	__u64	start;
27 	__u64	len;
28 	__u64	wp;
29 	__u8	type;
30 	__u8	cond;
31 	__u8	non_seq;
32 	__u8	reset;
33 	__u8	reserved[36];
34 };
35 struct blk_zone_report {
36 	__u64		sector;
37 	__u32		nr_zones;
38 	__u8		reserved[4];
39 	struct blk_zone zones[0];
40 };
41 struct blk_zone_range {
42 	__u64		sector;
43 	__u64		nr_sectors;
44 };
45 #define BLKREPORTZONE	_IOWR(0x12, 130, struct blk_zone_report)
46 #define BLKRESETZONE	_IOW(0x12, 131, struct blk_zone_range)
47 #endif
48