mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2 iQEtBAABCAAXBQJZQyPmEBxmYW16QHJlZGhhdC5jb20ACgkQyjViTGqRccaWrgf/ SCAHpi4gzWbr7AN03jP16Qy/kqNik6F7LTNSqrRbvBPb3TNchDd4z44SAghK5m/r +IlYQc20sBZ60tRHIHAUSF2WNcea2pj1v3ZVgjrI7hiJ3DXPiqqt/dAR/W/BLIDO tAHAVF6Pnrjm9DC4d2zATLDHvcHMzWOsnePh7XcOm44REbwUr3GDg6bf2+j+5yfS 9ewmXfh8z4w1IvSn+f5B+IeCvGvJNA1D55dqcGo8Ivlg9PnElziXFaXO2s7UiLIM mF3eTSIbJQNNN+E+0lpRpnqQiq+Txxggu61Q4f8bOTBhEOPa3etj1ydnXMVbvX25 6SUuBfGh51tyOIZOJz3GtA== =9b+J -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/famz/tags/docker-and-block-pull-request' into staging # gpg: Signature made Fri 16 Jun 2017 01:18:46 BST # gpg: using RSA key 0xCA35624C6A9171C6 # gpg: Good signature from "Fam Zheng <famz@redhat.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 5003 7CB7 9706 0F76 F021 AD56 CA35 624C 6A91 71C6 * remotes/famz/tags/docker-and-block-pull-request: (23 commits) block: make accounting thread-safe block: split BlockAcctStats creation and setup block: introduce block_account_one_io block: protect modification of dirty bitmaps with a mutex migration/block: reset dirty bitmap before reading block: introduce dirty_bitmap_mutex block: protect tracked_requests and flush_queue with reqs_lock block: access write_gen with atomics block: use Stat64 for wr_highest_offset util: add stats64 module throttle-groups: protect throttled requests with a CoMutex throttle-groups: do not use qemu_co_enter_next throttle-groups: only start one coroutine from drained_begin block: access io_plugged with atomic ops block: access wakeup with atomic ops block: access serialising_in_flight with atomic ops block: access io_limits_disabled with atomic ops block: access quiesce_counter with atomic ops block: access copy_on_read with atomic ops docker: Add flex and bison to centos6 image ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
65a0e3e842
23 changed files with 701 additions and 192 deletions
|
@ -341,10 +341,8 @@ static int set_dirty_tracking(void)
|
|||
int ret;
|
||||
|
||||
QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) {
|
||||
aio_context_acquire(blk_get_aio_context(bmds->blk));
|
||||
bmds->dirty_bitmap = bdrv_create_dirty_bitmap(blk_bs(bmds->blk),
|
||||
BLOCK_SIZE, NULL, NULL);
|
||||
aio_context_release(blk_get_aio_context(bmds->blk));
|
||||
if (!bmds->dirty_bitmap) {
|
||||
ret = -errno;
|
||||
goto fail;
|
||||
|
@ -355,9 +353,7 @@ static int set_dirty_tracking(void)
|
|||
fail:
|
||||
QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) {
|
||||
if (bmds->dirty_bitmap) {
|
||||
aio_context_acquire(blk_get_aio_context(bmds->blk));
|
||||
bdrv_release_dirty_bitmap(blk_bs(bmds->blk), bmds->dirty_bitmap);
|
||||
aio_context_release(blk_get_aio_context(bmds->blk));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
@ -370,9 +366,7 @@ static void unset_dirty_tracking(void)
|
|||
BlkMigDevState *bmds;
|
||||
|
||||
QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) {
|
||||
aio_context_acquire(blk_get_aio_context(bmds->blk));
|
||||
bdrv_release_dirty_bitmap(blk_bs(bmds->blk), bmds->dirty_bitmap);
|
||||
aio_context_release(blk_get_aio_context(bmds->blk));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -531,13 +525,16 @@ static int mig_save_device_dirty(QEMUFile *f, BlkMigDevState *bmds,
|
|||
} else {
|
||||
blk_mig_unlock();
|
||||
}
|
||||
if (bdrv_get_dirty(bs, bmds->dirty_bitmap, sector)) {
|
||||
|
||||
bdrv_dirty_bitmap_lock(bmds->dirty_bitmap);
|
||||
if (bdrv_get_dirty_locked(bs, bmds->dirty_bitmap, sector)) {
|
||||
if (total_sectors - sector < BDRV_SECTORS_PER_DIRTY_CHUNK) {
|
||||
nr_sectors = total_sectors - sector;
|
||||
} else {
|
||||
nr_sectors = BDRV_SECTORS_PER_DIRTY_CHUNK;
|
||||
}
|
||||
bdrv_reset_dirty_bitmap_locked(bmds->dirty_bitmap, sector, nr_sectors);
|
||||
bdrv_dirty_bitmap_unlock(bmds->dirty_bitmap);
|
||||
|
||||
blk = g_new(BlkMigBlock, 1);
|
||||
blk->buf = g_malloc(BLOCK_SIZE);
|
||||
blk->bmds = bmds;
|
||||
|
@ -570,12 +567,12 @@ static int mig_save_device_dirty(QEMUFile *f, BlkMigDevState *bmds,
|
|||
g_free(blk);
|
||||
}
|
||||
|
||||
bdrv_reset_dirty_bitmap(bmds->dirty_bitmap, sector, nr_sectors);
|
||||
sector += nr_sectors;
|
||||
bmds->cur_dirty = sector;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
bdrv_dirty_bitmap_unlock(bmds->dirty_bitmap);
|
||||
sector += BDRV_SECTORS_PER_DIRTY_CHUNK;
|
||||
bmds->cur_dirty = sector;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue