Use ETIMEDOUT instead of ETIME for exceeding max latency
authorJens Axboe <axboe@kernel.dk>
Thu, 8 Nov 2012 20:38:35 +0000 (21:38 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 8 Nov 2012 20:38:35 +0000 (21:38 +0100)
ETIME isn't very portable...

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_u.c

diff --git a/io_u.c b/io_u.c
index 551c5ffa3158859783d4475ab82c7c837b63cac5..119dd651a23ef7cbcdf121b2884eca98f3fcb57e 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -1359,8 +1359,8 @@ static void account_io_completion(struct thread_data *td, struct io_u *io_u,
                if (td->o.max_latency && tusec > td->o.max_latency) {
                        if (!td->error)
                                log_err("fio: latency of %lu usec exceeds specified max (%u usec)\n", tusec, td->o.max_latency);
                if (td->o.max_latency && tusec > td->o.max_latency) {
                        if (!td->error)
                                log_err("fio: latency of %lu usec exceeds specified max (%u usec)\n", tusec, td->o.max_latency);
-                       td_verror(td, ETIME, "max latency exceeded");
-                       icd->error = ETIME;
+                       td_verror(td, ETIMEDOUT, "max latency exceeded");
+                       icd->error = ETIMEDOUT;
                }
        }
 
                }
        }