diff mbox

[v2,09/14] vdi: Assign bs->file->bs to file in vdi_co_get_block_status

Message ID 1448437153-27090-10-git-send-email-famz@redhat.com
State New
Headers show

Commit Message

Fam Zheng Nov. 25, 2015, 7:39 a.m. UTC
Signed-off-by: Fam Zheng <famz@redhat.com>
---
 block/vdi.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Eric Blake Nov. 26, 2015, 5:04 a.m. UTC | #1
On 11/25/2015 12:39 AM, Fam Zheng wrote:
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  block/vdi.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/block/vdi.c b/block/vdi.c
> index 2199fd3..6b1a57b 100644
> --- a/block/vdi.c
> +++ b/block/vdi.c
> @@ -550,6 +550,7 @@ static int64_t coroutine_fn vdi_co_get_block_status(BlockDriverState *bs,
>      offset = s->header.offset_data +
>                                (uint64_t)bmap_entry * s->block_size +
>                                sector_in_block * SECTOR_SIZE;
> +    *file = bs->file->bs;
>      return BDRV_BLOCK_DATA | BDRV_BLOCK_OFFSET_VALID | offset;
>  }
>  
>
diff mbox

Patch

diff --git a/block/vdi.c b/block/vdi.c
index 2199fd3..6b1a57b 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -550,6 +550,7 @@  static int64_t coroutine_fn vdi_co_get_block_status(BlockDriverState *bs,
     offset = s->header.offset_data +
                               (uint64_t)bmap_entry * s->block_size +
                               sector_in_block * SECTOR_SIZE;
+    *file = bs->file->bs;
     return BDRV_BLOCK_DATA | BDRV_BLOCK_OFFSET_VALID | offset;
 }