Skip to content

Commit

Permalink
block: Request block status from *file for BDRV_BLOCK_RAW
Browse files Browse the repository at this point in the history
This fixes bdrv_co_get_block_status() for the bdrv_mirror_top block
driver, which must fall through to bs->backing instead of bs->file.

Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
  • Loading branch information
kevmw committed Mar 13, 2017
1 parent 466787f commit b64aa44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1760,7 +1760,7 @@ static int64_t coroutine_fn bdrv_co_get_block_status(BlockDriverState *bs,

if (ret & BDRV_BLOCK_RAW) {
assert(ret & BDRV_BLOCK_OFFSET_VALID);
ret = bdrv_get_block_status(bs->file->bs, ret >> BDRV_SECTOR_BITS,
ret = bdrv_get_block_status(*file, ret >> BDRV_SECTOR_BITS,
*pnum, pnum, file);
goto out;
}
Expand Down

0 comments on commit b64aa44

Please sign in to comment.