int qed_write_l2_table_sync(BDRVQEDState *s, QEDRequest *request,

                            unsigned int index, unsigned int n, bool flush)

{

    int ret = -EINPROGRESS;



    qed_write_l2_table(s, request, index, n, flush, qed_sync_cb, &ret);

    while (ret == -EINPROGRESS) {

        aio_poll(bdrv_get_aio_context(s->bs), true);

    }



    return ret;

}

int qed_write_l2_table_sync(BDRVQEDState *s, QEDRequest *request,

                            unsigned int index, unsigned int n, bool flush)

{

    int ret = -EINPROGRESS;



    qed_write_l2_table(s, request, index, n, flush, qed_sync_cb, &ret);

    while (ret == -EINPROGRESS) {

        aio_poll(bdrv_get_aio_context(s->bs), true);

    }



    return ret;

}

int FUNC_0(BDRVQEDState *VAR_0, QEDRequest *VAR_1,

                            unsigned int VAR_2, unsigned int VAR_3, bool VAR_4)

{

    int VAR_5 = -EINPROGRESS;



    qed_write_l2_table(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, qed_sync_cb, &VAR_5);

    while (VAR_5 == -EINPROGRESS) {

        aio_poll(bdrv_get_aio_context(VAR_0->bs), true);

    }



    return VAR_5;

}

int FUNC_0(BDRVQEDState *VAR_0, QEDRequest *VAR_1,
unsigned int VAR_2, unsigned int VAR_3, bool VAR_4)
{ int VAR_5 = -EINPROGRESS; qed_write_l2_table(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, qed_sync_cb, &VAR_5); while (VAR_5 == -EINPROGRESS) { aio_poll(bdrv_get_aio_context(VAR_0->bs), true); } return VAR_5; }