From c4cb947e8f92c10835164b67deed06828cfc01be Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 11 Oct 2021 09:49:21 -0600 Subject: [PATCH] io_u: don't attempt to requeue for full residual If we get zero bytes transferred, then don't attempt to re-set the io_u and requeue the IO. That's a fatal condition for this IO. Signed-off-by: Jens Axboe --- io_u.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io_u.c b/io_u.c index 5289b5d1..586a4bef 100644 --- a/io_u.c +++ b/io_u.c @@ -2004,7 +2004,7 @@ static void io_completed(struct thread_data *td, struct io_u **io_u_ptr, * Make sure we notice short IO from here, and requeue them * appropriately! */ - if (io_u->resid) { + if (bytes && io_u->resid) { io_u->xfer_buflen = io_u->resid; io_u->xfer_buf += bytes; io_u->offset += bytes; -- 2.25.1