Skip to content

Commit

Permalink
raw: Implement .bdrv_co_ioctl instead of .bdrv_aio_ioctl
Browse files Browse the repository at this point in the history
It's the simpler interface to use for the raw format driver.

Apart from that, this removes the last user of the AIO emulation
implemented by bdrv_aio_ioctl().

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
  • Loading branch information
kevmw committed Oct 27, 2016
1 parent 16a389d commit 151a293
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions block/raw_bsd.c
Expand Up @@ -176,12 +176,9 @@ static void raw_lock_medium(BlockDriverState *bs, bool locked)
bdrv_lock_medium(bs->file->bs, locked);
}

static BlockAIOCB *raw_aio_ioctl(BlockDriverState *bs,
unsigned long int req, void *buf,
BlockCompletionFunc *cb,
void *opaque)
static int raw_co_ioctl(BlockDriverState *bs, unsigned long int req, void *buf)
{
return bdrv_aio_ioctl(bs->file->bs, req, buf, cb, opaque);
return bdrv_co_ioctl(bs->file->bs, req, buf);
}

static int raw_has_zero_init(BlockDriverState *bs)
Expand Down Expand Up @@ -261,7 +258,7 @@ BlockDriver bdrv_raw = {
.bdrv_media_changed = &raw_media_changed,
.bdrv_eject = &raw_eject,
.bdrv_lock_medium = &raw_lock_medium,
.bdrv_aio_ioctl = &raw_aio_ioctl,
.bdrv_co_ioctl = &raw_co_ioctl,
.create_opts = &raw_create_opts,
.bdrv_has_zero_init = &raw_has_zero_init
};
Expand Down

0 comments on commit 151a293

Please sign in to comment.