]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qcow2: Assign bs->file->bs to file in qcow2_co_get_block_status
authorFam Zheng <famz@redhat.com>
Tue, 26 Jan 2016 03:58:50 +0000 (11:58 +0800)
committerMax Reitz <mreitz@redhat.com>
Tue, 2 Feb 2016 16:50:47 +0000 (17:50 +0100)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id: 1453780743-16806-4-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/qcow2.c

index d4ea6b416d1dba2d897ae94206291849d4c036fe..8babecdab242b8421cad8b649734784ce22e7732 100644 (file)
@@ -1349,6 +1349,7 @@ static int64_t coroutine_fn qcow2_co_get_block_status(BlockDriverState *bs,
         !s->cipher) {
         index_in_cluster = sector_num & (s->cluster_sectors - 1);
         cluster_offset |= (index_in_cluster << BDRV_SECTOR_BITS);
+        *file = bs->file->bs;
         status |= BDRV_BLOCK_OFFSET_VALID | cluster_offset;
     }
     if (ret == QCOW2_CLUSTER_ZERO) {