projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Restore type checking in calc_thread_status()
[fio.git]
/
options.c
diff --git
a/options.c
b/options.c
index 9b277309d26ac9eb83bbc23195c4dd95460ba418..447f231e71485268d7c6bcc5149edf5800e60aaa 100644
(file)
--- a/
options.c
+++ b/
options.c
@@
-482,7
+482,7
@@
static int str_rwmix_write_cb(void *data, unsigned long long *val)
static int str_exitall_cb(void)
{
static int str_exitall_cb(void)
{
- exitall_on_terminate =
1
;
+ exitall_on_terminate =
true
;
return 0;
}
return 0;
}
@@
-493,6
+493,9
@@
int fio_cpus_split(os_cpu_mask_t *mask, unsigned int cpu_index)
const long max_cpu = cpus_online();
cpus_in_mask = fio_cpu_count(mask);
const long max_cpu = cpus_online();
cpus_in_mask = fio_cpu_count(mask);
+ if (!cpus_in_mask)
+ return 0;
+
cpu_index = cpu_index % cpus_in_mask;
index = 0;
cpu_index = cpu_index % cpus_in_mask;
index = 0;
@@
-1773,6
+1776,11
@@
struct fio_option fio_options[FIO_MAX_OPTS] = {
.help = "Linux native asynchronous IO",
},
#endif
.help = "Linux native asynchronous IO",
},
#endif
+#ifdef ARCH_HAVE_IOURING
+ { .ival = "io_uring",
+ .help = "Fast Linux native aio",
+ },
+#endif
#ifdef CONFIG_POSIXAIO
{ .ival = "posixaio",
.help = "POSIX asynchronous IO",
#ifdef CONFIG_POSIXAIO
{ .ival = "posixaio",
.help = "POSIX asynchronous IO",
@@
-1891,6
+1899,9
@@
struct fio_option fio_options[FIO_MAX_OPTS] = {
.help = "HTTP (WebDAV/S3) IO engine",
},
#endif
.help = "HTTP (WebDAV/S3) IO engine",
},
#endif
+ { .ival = "nbd",
+ .help = "Network Block Device (NBD) IO engine"
+ },
},
},
{
},
},
{
@@
-2202,14
+2213,6
@@
struct fio_option fio_options[FIO_MAX_OPTS] = {
.category = FIO_OPT_C_IO,
.group = FIO_OPT_G_RANDOM,
},
.category = FIO_OPT_C_IO,
.group = FIO_OPT_G_RANDOM,
},
- {
- .name = "use_os_rand",
- .lname = "Use OS random",
- .type = FIO_OPT_DEPRECATED,
- .off1 = offsetof(struct thread_options, dep_use_os_rand),
- .category = FIO_OPT_C_IO,
- .group = FIO_OPT_G_RANDOM,
- },
{
.name = "norandommap",
.lname = "No randommap",
{
.name = "norandommap",
.lname = "No randommap",
@@
-4538,7
+4541,7
@@
struct fio_option fio_options[FIO_MAX_OPTS] = {
{
.name = "kb_base",
.lname = "KB Base",
{
.name = "kb_base",
.lname = "KB Base",
- .type = FIO_OPT_
INT
,
+ .type = FIO_OPT_
STR
,
.off1 = offsetof(struct thread_options, kb_base),
.prio = 1,
.def = "1024",
.off1 = offsetof(struct thread_options, kb_base),
.prio = 1,
.def = "1024",
@@
-4559,7
+4562,7
@@
struct fio_option fio_options[FIO_MAX_OPTS] = {
{
.name = "unit_base",
.lname = "Unit for quantities of data (Bits or Bytes)",
{
.name = "unit_base",
.lname = "Unit for quantities of data (Bits or Bytes)",
- .type = FIO_OPT_
INT
,
+ .type = FIO_OPT_
STR
,
.off1 = offsetof(struct thread_options, unit_base),
.prio = 1,
.posval = {
.off1 = offsetof(struct thread_options, unit_base),
.prio = 1,
.posval = {
@@
-4899,8
+4902,7
@@
char *fio_option_dup_subs(const char *opt)
return NULL;
}
return NULL;
}
- in[OPT_LEN_MAX] = '\0';
- strncpy(in, opt, OPT_LEN_MAX);
+ snprintf(in, sizeof(in), "%s", opt);
while (*inptr && nchr > 0) {
if (inptr[0] == '$' && inptr[1] == '{') {
while (*inptr && nchr > 0) {
if (inptr[0] == '$' && inptr[1] == '{') {