Re: Recent changes (master)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2014-10-09 09:20, Andrey Kuzmin wrote:
And how about this one?

index 7c3a42a..12f3b36 100644
--- a/engines/libaio.c
+++ b/engines/libaio.c
@@ -165,9 +165,9 @@ static int fio_libaio_getevents(struct thread_data
*td, unsigned int min,
                         r = io_getevents(ld->aio_ctx, actual_min,
                                 max, ld->aio_events + events, lt);
                 }
-               if (r >= 0)
+               if (r > 0)
                         events += r;
-               else if (r == -EAGAIN) {
+               else if ((min && r == 0) || r == -EAGAIN) {
                         fio_libaio_commit(td);
                         usleep(100);
                 } else if (r != -EINTR)

Yeah, this looks better.

--
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux