Commit c57b6656 authored by Kevin Wolf's avatar Kevin Wolf
Browse files

aio: Get rid of qemu_aio_flush()



There are no remaining users, and new users should probably be
using bdrv_drain_all() in the first place.

Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent d318aea9
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -215,8 +215,3 @@ void aio_context_unref(AioContext *ctx)
{
    g_source_unref(&ctx->source);
}

void aio_flush(AioContext *ctx)
{
    while (aio_poll(ctx, true));
}
+1 −1
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ static void coroutine_fn commit_run(void *opaque)

wait:
        /* Note that even when no rate limit is applied we need to yield
         * with no pending I/O here so that qemu_aio_flush() returns.
         * with no pending I/O here so that bdrv_drain_all() returns.
         */
        block_job_sleep_ns(&s->common, rt_clock, delay_ns);
        if (block_job_is_cancelled(&s->common)) {
+1 −1
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ static void coroutine_fn mirror_run(void *opaque)
            }

            /* Note that even when no rate limit is applied we need to yield
             * with no pending I/O here so that qemu_aio_flush() returns.
             * with no pending I/O here so that bdrv_drain_all() returns.
             */
            block_job_sleep_ns(&s->common, rt_clock, delay_ns);
            if (block_job_is_cancelled(&s->common)) {
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ static void coroutine_fn stream_run(void *opaque)

wait:
        /* Note that even when no rate limit is applied we need to yield
         * with no pending I/O here so that qemu_aio_flush() returns.
         * with no pending I/O here so that bdrv_drain_all() returns.
         */
        block_job_sleep_ns(&s->common, rt_clock, delay_ns);
        if (block_job_is_cancelled(&s->common)) {
+0 −5
Original line number Diff line number Diff line
@@ -432,11 +432,6 @@ QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque)
    return aio_bh_new(qemu_aio_context, cb, opaque);
}

void qemu_aio_flush(void)
{
    aio_flush(qemu_aio_context);
}

bool qemu_aio_wait(void)
{
    return aio_poll(qemu_aio_context, true);
Loading