[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 12/15] block: Remove the "bs->file" test in bdrv_
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH v5 12/15] block: Remove the "bs->file" test in bdrv_co_get_block_status |
Date: |
Tue, 5 Jan 2016 16:11:13 +0800 |
Now that all drivers return the right "file" pointer, we can remove this
check.
Signed-off-by: Fam Zheng <address@hidden>
---
block/io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/io.c b/block/io.c
index 492c291..1ca4e61 100644
--- a/block/io.c
+++ b/block/io.c
@@ -1550,7 +1550,7 @@ static int64_t coroutine_fn
bdrv_co_get_block_status(BlockDriverState *bs,
}
}
- if (bs->file && *file && *file != bs &&
+ if (*file && *file != bs &&
(ret & BDRV_BLOCK_DATA) && !(ret & BDRV_BLOCK_ZERO) &&
(ret & BDRV_BLOCK_OFFSET_VALID)) {
BlockDriverState *file2;
--
2.4.3
- [Qemu-devel] [PATCH v5 03/15] qcow2: Assign bs->file->bs to file in qcow2_co_get_block_status, (continued)
- [Qemu-devel] [PATCH v5 03/15] qcow2: Assign bs->file->bs to file in qcow2_co_get_block_status, Fam Zheng, 2016/01/05
- [Qemu-devel] [PATCH v5 04/15] raw: Assign bs to file in raw_co_get_block_status, Fam Zheng, 2016/01/05
- [Qemu-devel] [PATCH v5 05/15] iscsi: Assign bs to file in iscsi_co_get_block_status, Fam Zheng, 2016/01/05
- [Qemu-devel] [PATCH v5 06/15] parallels: Assign bs->file->bs to file in parallels_co_get_block_status, Fam Zheng, 2016/01/05
- [Qemu-devel] [PATCH v5 07/15] qed: Assign bs->file->bs to file in bdrv_qed_co_get_block_status, Fam Zheng, 2016/01/05
- [Qemu-devel] [PATCH v5 08/15] sheepdog: Assign bs to file in sd_co_get_block_status, Fam Zheng, 2016/01/05
- [Qemu-devel] [PATCH v5 09/15] vdi: Assign bs->file->bs to file in vdi_co_get_block_status, Fam Zheng, 2016/01/05
- [Qemu-devel] [PATCH v5 10/15] vpc: Assign bs->file->bs to file in vpc_co_get_block_status, Fam Zheng, 2016/01/05
- [Qemu-devel] [PATCH v5 11/15] vmdk: Return extent's file in bdrv_get_block_status, Fam Zheng, 2016/01/05
- [Qemu-devel] [PATCH v5 12/15] block: Remove the "bs->file" test in bdrv_co_get_block_status,
Fam Zheng <=
- [Qemu-devel] [PATCH v5 13/15] qemu-img: In "map", use the returned "file" from bdrv_get_block_status, Fam Zheng, 2016/01/05
- [Qemu-devel] [PATCH v5 14/15] qemu-img: Make MapEntry a QAPI struct, Fam Zheng, 2016/01/05
- [Qemu-devel] [PATCH v5 15/15] iotests: Add "qemu-img map" test for VMDK extents, Fam Zheng, 2016/01/05