projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
genfio: Adding prefix to fio filename
[fio.git]
/
ioengines.c
diff --git
a/ioengines.c
b/ioengines.c
index 4d1491cf079b5a504a22aad46965ade8c95bc6c8..d71e372048112e19010c1dd494a7a4b2872eb5fa 100644
(file)
--- a/
ioengines.c
+++ b/
ioengines.c
@@
-236,7
+236,7
@@
int td_io_getevents(struct thread_data *td, unsigned int min, unsigned int max,
out:
if (r >= 0) {
/*
out:
if (r >= 0) {
/*
- * Reflect that our submitted requests were retrieved with
+ * Reflect that our submitted requests were retrieved with
* whatever OS async calls are in the underlying engine.
*/
td->io_u_in_flight -= r;
* whatever OS async calls are in the underlying engine.
*/
td->io_u_in_flight -= r;
@@
-287,6
+287,13
@@
int td_io_queue(struct thread_data *td, struct io_u *io_u)
unlock_file(td, io_u->file);
unlock_file(td, io_u->file);
+ /*
+ * If an error was seen and the io engine didn't propagate it
+ * back to 'td', do so.
+ */
+ if (io_u->error && !td->error)
+ td_verror(td, io_u->error, "td_io_queue");
+
/*
* Add warning for O_DIRECT so that users have an easier time
* spotting potentially bad alignment. If this triggers for the first
/*
* Add warning for O_DIRECT so that users have an easier time
* spotting potentially bad alignment. If this triggers for the first
@@
-366,14
+373,14
@@
int td_io_commit(struct thread_data *td)
if (!td->cur_depth || !td->io_u_queued)
return 0;
if (!td->cur_depth || !td->io_u_queued)
return 0;
- io_u_mark_depth(td, td->io_u_queued);
+ io_u_mark_depth(td, td->io_u_queued);
if (td->io_ops->commit) {
ret = td->io_ops->commit(td);
if (ret)
td_verror(td, -ret, "io commit");
}
if (td->io_ops->commit) {
ret = td->io_ops->commit(td);
if (ret)
td_verror(td, -ret, "io commit");
}
-
+
/*
* Reflect that events were submitted as async IO requests.
*/
/*
* Reflect that events were submitted as async IO requests.
*/
@@
-540,7
+547,7
@@
int do_io_u_trim(struct thread_data *td, struct io_u *io_u)
ret = os_trim(f->fd, io_u->offset, io_u->xfer_buflen);
if (!ret)
ret = os_trim(f->fd, io_u->offset, io_u->xfer_buflen);
if (!ret)
- return io_u->xfer_buflen;
;
+ return io_u->xfer_buflen;
io_u->error = ret;
return 0;
io_u->error = ret;
return 0;