From: Jens Axboe Date: Wed, 17 Apr 2013 17:20:28 +0000 (+0200) Subject: Propagate io engine error back to 'td', if not already done X-Git-Tag: fio-2.1~29 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=39a43d34f168d1921819f0a1f9b2f9800e68aaa1;hp=cf7cadec891c9e4226f2d93c2014c87a94ebd730 Propagate io engine error back to 'td', if not already done Signed-off-by: Jens Axboe --- 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