All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org
Cc: marcandre.lureau@redhat.com, pl@kamp.de, peterx@redhat.com,
	quintela@redhat.com
Subject: [Qemu-devel] [PULL 3/6] migration/block: reset dirty bitmap before read in bulk phase
Date: Fri,  9 Mar 2018 17:54:50 +0000	[thread overview]
Message-ID: <20180309175453.41548-4-dgilbert@redhat.com> (raw)
In-Reply-To: <20180309175453.41548-1-dgilbert@redhat.com>

From: Peter Lieven <pl@kamp.de>

Reset the dirty bitmap before reading to make sure we don't miss
any new data.

Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Lieven <pl@kamp.de>
Message-Id: <1520507908-16743-3-git-send-email-pl@kamp.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 migration/block.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/migration/block.c b/migration/block.c
index 1f03946797..87bb35ce63 100644
--- a/migration/block.c
+++ b/migration/block.c
@@ -331,11 +331,10 @@ static int mig_save_device_bulk(QEMUFile *f, BlkMigDevState *bmds)
      */
     qemu_mutex_lock_iothread();
     aio_context_acquire(blk_get_aio_context(bmds->blk));
-    blk->aiocb = blk_aio_preadv(bb, cur_sector * BDRV_SECTOR_SIZE, &blk->qiov,
-                                0, blk_mig_read_cb, blk);
-
     bdrv_reset_dirty_bitmap(bmds->dirty_bitmap, cur_sector * BDRV_SECTOR_SIZE,
                             nr_sectors * BDRV_SECTOR_SIZE);
+    blk->aiocb = blk_aio_preadv(bb, cur_sector * BDRV_SECTOR_SIZE, &blk->qiov,
+                                0, blk_mig_read_cb, blk);
     aio_context_release(blk_get_aio_context(bmds->blk));
     qemu_mutex_unlock_iothread();
 
-- 
2.14.3

  parent reply	other threads:[~2018-03-09 17:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09 17:54 [Qemu-devel] [PULL 0/6] migration queue Dr. David Alan Gilbert (git)
2018-03-09 17:54 ` [Qemu-devel] [PULL 1/6] migration: fix minor finalize leak Dr. David Alan Gilbert (git)
2018-03-09 17:54 ` [Qemu-devel] [PULL 2/6] migration: do not transfer ram during bulk storage migration Dr. David Alan Gilbert (git)
2018-03-09 17:54 ` Dr. David Alan Gilbert (git) [this message]
2018-03-09 17:54 ` [Qemu-devel] [PULL 4/6] migration/block: rename MAX_INFLIGHT_IO to MAX_IO_BUFFERS Dr. David Alan Gilbert (git)
2018-03-09 17:54 ` [Qemu-devel] [PULL 5/6] migration: fix applying wrong capabilities Dr. David Alan Gilbert (git)
2018-03-09 17:54 ` [Qemu-devel] [PULL 6/6] tests: Silence migration-test 'bad' test Dr. David Alan Gilbert (git)
2018-03-12 14:06 ` [Qemu-devel] [PULL 0/6] migration queue Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180309175453.41548-4-dgilbert@redhat.com \
    --to=dgilbert@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=peterx@redhat.com \
    --cc=pl@kamp.de \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.