[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 14/42] migration: omit drive ref as we have bdrv_ref
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 14/42] migration: omit drive ref as we have bdrv_ref now |
Date: |
Fri, 6 Sep 2013 17:38:45 +0200 |
From: Fam Zheng <address@hidden>
block-migration.c does not actually use DriveInfo anywhere. Hence it's
safe to drive ref code, we really only care about referencing BDS.
Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
block-migration.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block-migration.c b/block-migration.c
index f803f20..daf9ec1 100644
--- a/block-migration.c
+++ b/block-migration.c
@@ -336,8 +336,8 @@ static void init_blk_migration_it(void *opaque,
BlockDriverState *bs)
bmds->completed_sectors = 0;
bmds->shared_base = block_mig_state.shared_base;
alloc_aio_bitmap(bmds);
- drive_get_ref(drive_get_by_blockdev(bs));
bdrv_set_in_use(bs, 1);
+ bdrv_ref(bs);
block_mig_state.total_sector_sum += sectors;
@@ -575,7 +575,7 @@ static void blk_mig_cleanup(void)
while ((bmds = QSIMPLEQ_FIRST(&block_mig_state.bmds_list)) != NULL) {
QSIMPLEQ_REMOVE_HEAD(&block_mig_state.bmds_list, entry);
bdrv_set_in_use(bmds->bs, 0);
- drive_put_ref(drive_get_by_blockdev(bmds->bs));
+ bdrv_unref(bmds->bs);
g_free(bmds->aio_bitmap);
g_free(bmds);
}
--
1.8.3.1
- [Qemu-devel] [PULL 04/42] block: Add support for throttling burst max in QMP and the command line., (continued)
- [Qemu-devel] [PULL 04/42] block: Add support for throttling burst max in QMP and the command line., Stefan Hajnoczi, 2013/09/06
- [Qemu-devel] [PULL 05/42] block: Add iops_size to do the iops accounting for a given io size., Stefan Hajnoczi, 2013/09/06
- [Qemu-devel] [PULL 06/42] qemu-iotests: Adjust test result 039, Stefan Hajnoczi, 2013/09/06
- [Qemu-devel] [PULL 08/42] w32: Fix access to host devices (regression), Stefan Hajnoczi, 2013/09/06
- [Qemu-devel] [PULL 07/42] add qemu-img convert -n option (skip target volume creation), Stefan Hajnoczi, 2013/09/06
- [Qemu-devel] [PULL 10/42] vvfat: use bdrv_new() to allocate BlockDriverState, Stefan Hajnoczi, 2013/09/06
- [Qemu-devel] [PULL 09/42] aio / timers: fix build of test/test-aio.c on non-linux platforms, Stefan Hajnoczi, 2013/09/06
- [Qemu-devel] [PULL 11/42] iscsi: use bdrv_new() instead of stack structure, Stefan Hajnoczi, 2013/09/06
- [Qemu-devel] [PULL 12/42] block: implement reference count for BlockDriverState, Stefan Hajnoczi, 2013/09/06
- [Qemu-devel] [PULL 13/42] block: make bdrv_delete() static, Stefan Hajnoczi, 2013/09/06
- [Qemu-devel] [PULL 14/42] migration: omit drive ref as we have bdrv_ref now,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 15/42] xen_disk: simplify blk_disconnect with refcnt, Stefan Hajnoczi, 2013/09/06
- [Qemu-devel] [PULL 27/42] qemu-img: always probe the input image for allocated sectors, Stefan Hajnoczi, 2013/09/06
- [Qemu-devel] [PULL 28/42] block: make bdrv_has_zero_init return false for copy-on-write-images, Stefan Hajnoczi, 2013/09/06
- [Qemu-devel] [PULL 29/42] block: introduce bdrv_get_block_status API, Stefan Hajnoczi, 2013/09/06
- [Qemu-devel] [PULL 31/42] block: return get_block_status data and flags for formats, Stefan Hajnoczi, 2013/09/06
- [Qemu-devel] [PULL 30/42] block: define get_block_status return value, Stefan Hajnoczi, 2013/09/06
- [Qemu-devel] [PULL 32/42] block: use bdrv_has_zero_init to return BDRV_BLOCK_ZERO, Stefan Hajnoczi, 2013/09/06