Skip to content

Commit

Permalink
block: raw image file reopen
Browse files Browse the repository at this point in the history
These are the stubs for the file reopen drivers for the raw format.

There is currently nothing that needs to be done by the raw driver
in reopen.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
codyprime authored and kevmw committed Sep 24, 2012
1 parent eeb6b45 commit 01bdddb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions block/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ static int raw_open(BlockDriverState *bs, int flags)
return 0;
}

/* We have nothing to do for raw reopen, stubs just return
* success */
static int raw_reopen_prepare(BDRVReopenState *state,
BlockReopenQueue *queue, Error **errp)
{
return 0;
}

static int coroutine_fn raw_co_readv(BlockDriverState *bs, int64_t sector_num,
int nb_sectors, QEMUIOVector *qiov)
{
Expand Down Expand Up @@ -115,6 +123,8 @@ static BlockDriver bdrv_raw = {
.bdrv_open = raw_open,
.bdrv_close = raw_close,

.bdrv_reopen_prepare = raw_reopen_prepare,

.bdrv_co_readv = raw_co_readv,
.bdrv_co_writev = raw_co_writev,
.bdrv_co_is_allocated = raw_co_is_allocated,
Expand Down

0 comments on commit 01bdddb

Please sign in to comment.