typedef struct CURLAIOCB {
BlockAIOCB common;
- QEMUBH *bh;
QEMUIOVector *qiov;
int64_t sector_num;
CURLAIOCB *acb = p;
BDRVCURLState *s = acb->common.bs->opaque;
- qemu_bh_delete(acb->bh);
- acb->bh = NULL;
-
size_t start = acb->sector_num * SECTOR_SIZE;
size_t end;
acb->sector_num = sector_num;
acb->nb_sectors = nb_sectors;
- acb->bh = aio_bh_new(bdrv_get_aio_context(bs), curl_readv_bh_cb, acb);
- qemu_bh_schedule(acb->bh);
+ aio_bh_schedule_oneshot(bdrv_get_aio_context(bs), curl_readv_bh_cb, acb);
return &acb->common;
}