From: Vladimir Sementsov-Ogievskiy <vsementsov@parallels.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, den@openvz.org, stefanha@redhat.com
Subject: [Qemu-devel] [PATCH] Fix block migration bug
Date: Thu, 11 Dec 2014 14:55:23 +0300 [thread overview]
Message-ID: <1418298924-4173-1-git-send-email-vsementsov@parallels.com> (raw)
Because of wrong return value of .save_live_pending() in
block-migration, migration finishes before the whole disk
is transferred. Such situation occures when the migration
process is fast enouth, for example when source and dest
are on the same host.
It's easy to test this with the following:
bug.sh
=====================================================================
#!/bin/sh
size=$1
addr=$2
rm /tmp/fifo-mig /tmp/a /tmp/b /tmp/sock-mig
./qemu-img create -f qcow2 /tmp/a $size
./qemu-img create -f qcow2 /tmp/b $size
./qemu-io -c "write -P 0x22 $addr 512" /tmp/a
mkfifo /tmp/fifo-mig
./x86_64-softmmu/qemu-system-x86_64 -drive file=/tmp/b,id=disk\
-qmp unix:/tmp/sock-mig,server,nowait\
-incoming "exec: cat /tmp/fifo-mig" &
echo 'migrate -b exec:cat>/tmp/fifo-mig\nquit\n' |\
./x86_64-softmmu/qemu-system-x86_64 -drive file=/tmp/a,id=disk\
-monitor stdio
./scripts/qmp/qmp --path=/tmp/sock-mig quit
sleep 3
echo checking
./qemu-io -c "read -P 0x22 $addr 512" /tmp/b
=====================================================================
For './bug.sh 1G 1M' qemu-io check finishes successfully,
but for './bug.sh 1G 1022M' it finishes with 'Pattern verification
failed' status.
The following patch fixes this bug.
Vladimir Sementsov-Ogievskiy (1):
block-migration: fix pending() return value
block-migration.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
1.9.1
next reply other threads:[~2014-12-11 11:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-11 11:55 Vladimir Sementsov-Ogievskiy [this message]
2014-12-11 11:55 ` [Qemu-devel] [PATCH] block-migration: fix pending() return value Vladimir Sementsov-Ogievskiy
2014-12-11 15:07 ` Eric Blake
2014-12-19 11:44 ` Vladimir Sementsov-Ogievskiy
2015-01-29 7:58 ` Markus Armbruster
2015-01-29 8:35 ` Vladimir Sementsov-Ogievskiy
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=1418298924-4173-1-git-send-email-vsementsov@parallels.com \
--to=vsementsov@parallels.com \
--cc=den@openvz.org \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@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.