int bdrv_ioctl(BlockDriverState *bs, unsigned long int req, void *buf)

{

    BdrvIoctlCoData data = {

        .bs = bs,

        .req = req,

        .buf = buf,

        .ret = -EINPROGRESS,

    };



    if (qemu_in_coroutine()) {

        /* Fast-path if already in coroutine context */

        bdrv_co_ioctl_entry(&data);

    } else {

        Coroutine *co = qemu_coroutine_create(bdrv_co_ioctl_entry);



        qemu_coroutine_enter(co, &data);

        while (data.ret == -EINPROGRESS) {

            aio_poll(bdrv_get_aio_context(bs), true);

        }

    }

    return data.ret;

}

int bdrv_ioctl(BlockDriverState *bs, unsigned long int req, void *buf)

{

    BdrvIoctlCoData data = {

        .bs = bs,

        .req = req,

        .buf = buf,

        .ret = -EINPROGRESS,

    };



    if (qemu_in_coroutine()) {

        

        bdrv_co_ioctl_entry(&data);

    } else {

        Coroutine *co = qemu_coroutine_create(bdrv_co_ioctl_entry);



        qemu_coroutine_enter(co, &data);

        while (data.ret == -EINPROGRESS) {

            aio_poll(bdrv_get_aio_context(bs), true);

        }

    }

    return data.ret;

}

        qemu_coroutine_enter(co, &data);         qemu_coroutine_enter(co, &data);         Coroutine *co = qemu_coroutine_create(bdrv_co_ioctl_entry);         qemu_coroutine_enter(co, &data);         qemu_coroutine_enter(co, &data);
int FUNC_0(BlockDriverState *VAR_0, unsigned long int VAR_1, void *VAR_2)

{

    BdrvIoctlCoData data = {

        .VAR_0 = VAR_0,

        .VAR_1 = VAR_1,

        .VAR_2 = VAR_2,

        .ret = -EINPROGRESS,

    };



    if (qemu_in_coroutine()) {

        

        bdrv_co_ioctl_entry(&data);

    } else {

        Coroutine *co = qemu_coroutine_create(bdrv_co_ioctl_entry);



        qemu_coroutine_enter(co, &data);

        while (data.ret == -EINPROGRESS) {

            aio_poll(bdrv_get_aio_context(VAR_0), true);

        }

    }

    return data.ret;

}

int FUNC_0(BlockDriverState *VAR_0, unsigned long int VAR_1, void *VAR_2)
{ BdrvIoctlCoData data = { .VAR_0 = VAR_0,
.VAR_1 = VAR_1,
.VAR_2 = VAR_2,
.ret = -EINPROGRESS,
}; if (qemu_in_coroutine()) { bdrv_co_ioctl_entry(&data); } else { Coroutine *co = qemu_coroutine_create(bdrv_co_ioctl_entry); qemu_coroutine_enter(co, &data); while (data.ret == -EINPROGRESS) { aio_poll(bdrv_get_aio_context(VAR_0), true); } } return data.ret; }