[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL v2 45/50] block: Use returned *file in bdrv_co_get_bl
From: |
Max Reitz |
Subject: |
[Qemu-block] [PULL v2 45/50] block: Use returned *file in bdrv_co_get_block_status |
Date: |
Tue, 2 Feb 2016 18:35:38 +0100 |
From: Fam Zheng <address@hidden>
Now that all drivers return the right "file" pointer, we can use it.
Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
---
block/io.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/io.c b/block/io.c
index ea040be..343ff1f 100644
--- a/block/io.c
+++ b/block/io.c
@@ -1554,13 +1554,13 @@ static int64_t coroutine_fn
bdrv_co_get_block_status(BlockDriverState *bs,
}
}
- if (bs->file &&
+ if (*file && *file != bs &&
(ret & BDRV_BLOCK_DATA) && !(ret & BDRV_BLOCK_ZERO) &&
(ret & BDRV_BLOCK_OFFSET_VALID)) {
BlockDriverState *file2;
int file_pnum;
- ret2 = bdrv_co_get_block_status(bs->file->bs, ret >> BDRV_SECTOR_BITS,
+ ret2 = bdrv_co_get_block_status(*file, ret >> BDRV_SECTOR_BITS,
*pnum, &file_pnum, &file2);
if (ret2 >= 0) {
/* Ignore errors. This is just providing extra information, it
--
2.7.0
- [Qemu-block] [PULL v2 32/50] block: acquire in bdrv_query_image_info, (continued)
- [Qemu-block] [PULL v2 32/50] block: acquire in bdrv_query_image_info, Max Reitz, 2016/02/02
- [Qemu-block] [PULL v2 34/50] qcow: Assign bs->file->bs to file in qcow_co_get_block_status, Max Reitz, 2016/02/02
- [Qemu-block] [PULL v2 33/50] block: Add "file" output parameter to block status query functions, Max Reitz, 2016/02/02
- [Qemu-block] [PULL v2 35/50] qcow2: Assign bs->file->bs to file in qcow2_co_get_block_status, Max Reitz, 2016/02/02
- [Qemu-block] [PULL v2 36/50] raw: Assign bs to file in raw_co_get_block_status, Max Reitz, 2016/02/02
- [Qemu-block] [PULL v2 38/50] parallels: Assign bs->file->bs to file in parallels_co_get_block_status, Max Reitz, 2016/02/02
- [Qemu-block] [PULL v2 37/50] iscsi: Assign bs to file in iscsi_co_get_block_status, Max Reitz, 2016/02/02
- [Qemu-block] [PULL v2 39/50] qed: Assign bs->file->bs to file in bdrv_qed_co_get_block_status, Max Reitz, 2016/02/02
- [Qemu-block] [PULL v2 40/50] sheepdog: Assign bs to file in sd_co_get_block_status, Max Reitz, 2016/02/02
- [Qemu-block] [PULL v2 41/50] vdi: Assign bs->file->bs to file in vdi_co_get_block_status, Max Reitz, 2016/02/02
- [Qemu-block] [PULL v2 45/50] block: Use returned *file in bdrv_co_get_block_status,
Max Reitz <=
- [Qemu-block] [PULL v2 42/50] vpc: Assign bs->file->bs to file in vpc_co_get_block_status, Max Reitz, 2016/02/02
- [Qemu-block] [PULL v2 43/50] vmdk: Fix calculation of block status's offset, Max Reitz, 2016/02/02
- [Qemu-block] [PULL v2 44/50] vmdk: Return extent's file in bdrv_get_block_status, Max Reitz, 2016/02/02
- [Qemu-block] [PULL v2 46/50] qemu-img: In "map", use the returned "file" from bdrv_get_block_status, Max Reitz, 2016/02/02
- [Qemu-block] [PULL v2 47/50] qemu-img: Make MapEntry a QAPI struct, Max Reitz, 2016/02/02
- [Qemu-block] [PULL v2 49/50] block: set device_list.tqe_prev to NULL on BDS removal, Max Reitz, 2016/02/02
- [Qemu-block] [PULL v2 48/50] iotests: Add "qemu-img map" test for VMDK extents, Max Reitz, 2016/02/02
- [Qemu-block] [PULL v2 50/50] block: qemu-iotests - add test for snapshot, commit, snapshot bug, Max Reitz, 2016/02/02
- Re: [Qemu-block] [Qemu-devel] [PULL v2 00/50] Block patches, Peter Maydell, 2016/02/02