diff options
author | Fam Zheng <famz@redhat.com> | 2016-01-26 11:58:57 +0800 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:30:23 -0600 |
commit | 17147f5b1efe65a200dae17b02523ace185a2326 (patch) | |
tree | f186814d99f457016fadbb173ae442ab41215978 /block | |
parent | f93b549567f8de9286cb0443385050473b11c335 (diff) | |
download | hqemu-17147f5b1efe65a200dae17b02523ace185a2326.zip hqemu-17147f5b1efe65a200dae17b02523ace185a2326.tar.gz |
vpc: Assign bs->file->bs to file in vpc_co_get_block_status
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id: 1453780743-16806-11-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/vpc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/vpc.c b/block/vpc.c index a070307..f504536 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -589,6 +589,7 @@ static int64_t coroutine_fn vpc_co_get_block_status(BlockDriverState *bs, if (be32_to_cpu(footer->type) == VHD_FIXED) { *pnum = nb_sectors; + *file = bs->file->bs; return BDRV_BLOCK_RAW | BDRV_BLOCK_OFFSET_VALID | BDRV_BLOCK_DATA | (sector_num << BDRV_SECTOR_BITS); } @@ -610,6 +611,7 @@ static int64_t coroutine_fn vpc_co_get_block_status(BlockDriverState *bs, /* *pnum can't be greater than one block for allocated * sectors since there is always a bitmap in between. */ if (allocated) { + *file = bs->file->bs; return BDRV_BLOCK_DATA | BDRV_BLOCK_OFFSET_VALID | start; } if (nb_sectors == 0) { |