projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nvme: add nvme opcodes, structures and helper functions
[fio.git]
/
parse.h
diff --git
a/parse.h
b/parse.h
index e6663ed484ed343b096ebc33a28a52560f642aea..d68484eaf0c65572352222297162ebd0d20cf7e7 100644
(file)
--- a/
parse.h
+++ b/
parse.h
@@
-21,6
+21,7
@@
enum fio_opt_type {
FIO_OPT_BOOL,
FIO_OPT_FLOAT_LIST,
FIO_OPT_STR_SET,
FIO_OPT_BOOL,
FIO_OPT_FLOAT_LIST,
FIO_OPT_STR_SET,
+ FIO_OPT_STR_VAL_ZONE,
FIO_OPT_DEPRECATED,
FIO_OPT_SOFT_DEPRECATED,
FIO_OPT_UNSUPPORTED, /* keep this last */
FIO_OPT_DEPRECATED,
FIO_OPT_SOFT_DEPRECATED,
FIO_OPT_UNSUPPORTED, /* keep this last */
@@
-130,12
+131,18
@@
static inline void *td_var(void *to, const struct fio_option *o,
static inline int parse_is_percent(unsigned long long val)
{
static inline int parse_is_percent(unsigned long long val)
{
- return val
<= -1ULL && val >= (-1ULL - 100ULL)
;
+ return val
>= -101ULL
;
}
}
+#define ZONE_BASE_VAL ((-1ULL >> 1) + 1)
static inline int parse_is_percent_uncapped(unsigned long long val)
{
static inline int parse_is_percent_uncapped(unsigned long long val)
{
- return (long long)val <= -1;
+ return ZONE_BASE_VAL + -1U < val;
+}
+
+static inline int parse_is_zone(unsigned long long val)
+{
+ return (val - ZONE_BASE_VAL) <= -1U;
}
struct print_option {
}
struct print_option {