From d06093e70ee89e8440431b78846fa3815a9cb89d Mon Sep 17 00:00:00 2001 From: Steven Lang Date: Mon, 13 Jun 2011 09:47:36 +0200 Subject: [PATCH] Fix fill_device with queue depth higher than 1 I found an interesting combination of using fill_device when the iodepth is greater than 1. All outstanding IO causes an ENOSPC error, but only the first is treated specially. The remainder come through and cause an error exit condition when the IO queue is being cleared. So it is impossible to use deep IO with fill device. This patch should fix the issue. Signed-off-by: Jens Axboe --- fio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fio.c b/fio.c index 34956e9f..5ea1a2c3 100644 --- a/fio.c +++ b/fio.c @@ -760,8 +760,11 @@ sync_done: struct fio_file *f; i = td->cur_depth; - if (i) + if (i) { ret = io_u_queued_complete(td, i, NULL); + if (td->o.fill_device && td->error == ENOSPC) + td->error = 0; + } if (should_fsync(td) && td->o.end_fsync) { td_set_runstate(td, TD_FSYNCING); -- 2.25.1