projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix trivial calloc argument order
[fio.git]
/
ioengines.c
diff --git
a/ioengines.c
b/ioengines.c
index ae55f951d413fbaeaf92dae3c8eb0746167d4c9d..a1f8756d086ca5d06c5e1de063ec702f8294a228 100644
(file)
--- a/
ioengines.c
+++ b/
ioengines.c
@@
-298,6
+298,7
@@
int td_io_queue(struct thread_data *td, struct io_u *io_u)
td->io_issues[ddir]--;
td->io_issue_bytes[ddir] -= buflen;
td->rate_io_issue_bytes[ddir] -= buflen;
td->io_issues[ddir]--;
td->io_issue_bytes[ddir] -= buflen;
td->rate_io_issue_bytes[ddir] -= buflen;
+ io_u_clear(td, io_u, IO_U_F_FLIGHT);
}
/*
}
/*
@@
-447,14
+448,24
@@
int td_io_open_file(struct thread_data *td, struct fio_file *f)
if (td->o.invalidate_cache && file_invalidate_cache(td, f))
goto err;
if (td->o.invalidate_cache && file_invalidate_cache(td, f))
goto err;
- if (td->o.fadvise_hint &&
+ if (td->o.fadvise_hint
!= F_ADV_NONE
&&
(f->filetype == FIO_TYPE_BD || f->filetype == FIO_TYPE_FILE)) {
int flags;
(f->filetype == FIO_TYPE_BD || f->filetype == FIO_TYPE_FILE)) {
int flags;
- if (td_random(td))
+ if (td->o.fadvise_hint == F_ADV_TYPE) {
+ if (td_random(td))
+ flags = POSIX_FADV_RANDOM;
+ else
+ flags = POSIX_FADV_SEQUENTIAL;
+ } else if (td->o.fadvise_hint == F_ADV_RANDOM)
flags = POSIX_FADV_RANDOM;
flags = POSIX_FADV_RANDOM;
- else
+ else
if (td->o.fadvise_hint == F_ADV_SEQUENTIAL)
flags = POSIX_FADV_SEQUENTIAL;
flags = POSIX_FADV_SEQUENTIAL;
+ else {
+ log_err("fio: unknown fadvise type %d\n",
+ td->o.fadvise_hint);
+ flags = POSIX_FADV_NORMAL;
+ }
if (posix_fadvise(f->fd, f->file_offset, f->io_size, flags) < 0) {
td_verror(td, errno, "fadvise");
if (posix_fadvise(f->fd, f->file_offset, f->io_size, flags) < 0) {
td_verror(td, errno, "fadvise");
@@
-483,7
+494,12
@@
int td_io_open_file(struct thread_data *td, struct fio_file *f)
if (ret) {
td_verror(td, ret, "fio_set_odirect");
if (ret) {
td_verror(td, ret, "fio_set_odirect");
- log_err("fio: the file system does not seem to support direct IO\n");
+ if (ret == ENOTTY) { /* ENOTTY suggests RAW device or ZFS */
+ log_err("fio: doing directIO to RAW devices or ZFS not supported\n");
+ } else {
+ log_err("fio: the file system does not seem to support direct IO\n");
+ }
+
goto err;
}
}
goto err;
}
}