diff mbox

[v3,12/15] qemu-img: In "map", use the returned "file" from bdrv_get_block_status

Message ID 1448514335-15988-13-git-send-email-famz@redhat.com
State New
Headers show

Commit Message

Fam Zheng Nov. 26, 2015, 5:05 a.m. UTC
Now all drivers should return a correct "file", we can make use of it,
even with the recursion into backing chain above.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 qemu-img.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Blake Nov. 26, 2015, 5:21 a.m. UTC | #1
On 11/25/2015 10:05 PM, Fam Zheng wrote:
> Now all drivers should return a correct "file", we can make use of it,
> even with the recursion into backing chain above.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  qemu-img.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

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

> 
> diff --git a/qemu-img.c b/qemu-img.c
> index 7954242..a7fa794 100644
> --- a/qemu-img.c
> +++ b/qemu-img.c
> @@ -2222,7 +2222,7 @@ static int get_block_status(BlockDriverState *bs, int64_t sector_num,
>      e->flags = ret & ~BDRV_BLOCK_OFFSET_MASK;
>      e->offset = ret & BDRV_BLOCK_OFFSET_MASK;
>      e->depth = depth;
> -    e->bs = bs;
> +    e->bs = file;
>      return 0;
>  }
>  
>
diff mbox

Patch

diff --git a/qemu-img.c b/qemu-img.c
index 7954242..a7fa794 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -2222,7 +2222,7 @@  static int get_block_status(BlockDriverState *bs, int64_t sector_num,
     e->flags = ret & ~BDRV_BLOCK_OFFSET_MASK;
     e->offset = ret & BDRV_BLOCK_OFFSET_MASK;
     e->depth = depth;
-    e->bs = bs;
+    e->bs = file;
     return 0;
 }