forked from axboe/fio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzbd_types.h
57 lines (50 loc) · 1.19 KB
/
zbd_types.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
* Copyright (C) 2020 Western Digital Corporation or its affiliates.
*
* This file is released under the GPL.
*/
#ifndef FIO_ZBD_TYPES_H
#define FIO_ZBD_TYPES_H
#include <inttypes.h>
#define ZBD_MAX_OPEN_ZONES 4096
/*
* Zoned block device models.
*/
enum zbd_zoned_model {
ZBD_IGNORE, /* Ignore file */
ZBD_NONE, /* Regular block device */
ZBD_HOST_AWARE, /* Host-aware zoned block device */
ZBD_HOST_MANAGED, /* Host-managed zoned block device */
};
/*
* Zone types.
*/
enum zbd_zone_type {
ZBD_ZONE_TYPE_CNV = 0x1, /* Conventional */
ZBD_ZONE_TYPE_SWR = 0x2, /* Sequential write required */
ZBD_ZONE_TYPE_SWP = 0x3, /* Sequential write preferred */
};
/*
* Zone conditions.
*/
enum zbd_zone_cond {
ZBD_ZONE_COND_NOT_WP = 0x0,
ZBD_ZONE_COND_EMPTY = 0x1,
ZBD_ZONE_COND_IMP_OPEN = 0x2,
ZBD_ZONE_COND_EXP_OPEN = 0x3,
ZBD_ZONE_COND_CLOSED = 0x4,
ZBD_ZONE_COND_READONLY = 0xD,
ZBD_ZONE_COND_FULL = 0xE,
ZBD_ZONE_COND_OFFLINE = 0xF,
};
/*
* Zone descriptor.
*/
struct zbd_zone {
uint64_t start;
uint64_t wp;
uint64_t len;
enum zbd_zone_type type;
enum zbd_zone_cond cond;
};
#endif /* FIO_ZBD_TYPES_H */