From 39a43d34f168d1921819f0a1f9b2f9800e68aaa1 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 17 Apr 2013 19:20:28 +0200 Subject: [PATCH] Propagate io engine error back to 'td', if not already done Signed-off-by: Jens Axboe --- ioengines.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ioengines.c b/ioengines.c index 93e76312..d71e3720 100644 --- a/ioengines.c +++ b/ioengines.c @@ -287,6 +287,13 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u) 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 -- 2.25.1