Il 01/08/2014 16:34, Stefan Hajnoczi ha scritto: > On Wed, Jul 09, 2014 at 11:53:01AM +0200, Paolo Bonzini wrote: >> diff --git a/async.c b/async.c >> index 34af0b2..ac40eab 100644 >> --- a/async.c >> +++ b/async.c >> @@ -152,39 +152,43 @@ void qemu_bh_delete(QEMUBH *bh) >> bh->deleted = 1; >> } >> >> -static gboolean >> -aio_ctx_prepare(GSource *source, gint *timeout) >> +int >> +aio_compute_timeout(AioContext *ctx) > > The return value is now nanoseconds so a 32-bit int doesn't offer much > range (only 2 seconds for a signed int). > > Any reason to use int instead of int64_t as used by the timer API?
Can you squash the obvious diff --git a/async.c b/async.c index ac40eab..09e09c6 100644 --- a/async.c +++ b/async.c @@ -152,7 +152,7 @@ void qemu_bh_delete(QEMUBH *bh) bh->deleted = 1; } -int +int64_t aio_compute_timeout(AioContext *ctx) { int64_t deadline; diff --git a/include/block/aio.h b/include/block/aio.h index 7eeb961..05b531c 100644 --- a/include/block/aio.h +++ b/include/block/aio.h @@ -309,6 +309,6 @@ static inline void aio_timer_init(AioContext *ctx, * * Compute the timeout that a blocking aio_poll should use. */ -int aio_compute_timeout(AioContext *ctx); +int64_t aio_compute_timeout(AioContext *ctx); #endif yourself, or should I send v2 of this patch or the whole series? Paolo