Commit 9e430340 authored by Fam Zheng's avatar Fam Zheng Committed by Max Reitz
Browse files

qemu-img: In "map", use the returned "file" from bdrv_get_block_status



Now all drivers should return a correct "file", we can make use of it,
even with the recursion into backing chain above.

Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: default avatarFam Zheng <famz@redhat.com>
Message-id: 1453780743-16806-15-git-send-email-famz@redhat.com
Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
parent ac987b30
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2236,7 +2236,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;
}