From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y750P-0004bw-2C for qemu-devel@nongnu.org; Fri, 02 Jan 2015 11:23:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y750K-00053O-EC for qemu-devel@nongnu.org; Fri, 02 Jan 2015 11:23:17 -0500 Date: Fri, 2 Jan 2015 16:23:08 +0000 From: Stefan Hajnoczi Message-ID: <20150102162308.GP10823@stefanha-thinkpad.redhat.com> References: <1419933856-4018-1-git-send-email-vsementsov@parallels.com> <1419933856-4018-2-git-send-email-vsementsov@parallels.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OmL7C/BU0IhhC9Of" Content-Disposition: inline In-Reply-To: <1419933856-4018-2-git-send-email-vsementsov@parallels.com> Subject: Re: [Qemu-devel] [PATCH v2 1/1] migration/block: fix pending() return value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Sementsov-Ogievskiy Cc: amit.shah@redhat.com, den@openvz.org, qemu-stable@nongnu.org, qemu-devel@nongnu.org, quintela@redhat.com --OmL7C/BU0IhhC9Of Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 30, 2014 at 01:04:16PM +0300, Vladimir Sementsov-Ogievskiy wrot= e: > Because of wrong return value of .save_live_pending() in > migration/block.c, migration finishes before the whole disk is > transferred. Such situation occurs when the migration process is fast > enough, for example when source and dest are on the same host. >=20 > If in the bulk phase we return something < max_size, we will skip > transferring the tail of the device. Currently we have "set pending to > BLOCK_SIZE if it is zero" for bulk phase, but there no guarantee, that > it will be < max_size. >=20 > True approach is to return, for example, max_size+1 when we are in the > bulk phase. >=20 > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > migration/block.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Yikes, this is a nasty bug. CCing qemu-stable. Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan --OmL7C/BU0IhhC9Of Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUpsXrAAoJEJykq7OBq3PIiEAH/0YdM+9QkLj39RZFf0x2kJeF 4QzdhvFt3iky89gBBqxnPeNS7cdnJYgd0JPDKWhQhyix9KXEqRpgLYZQU7v7201H xHynNyiuRkVqe9su1YCsTJXxOVbZjV7SQuxse1CFn2KLt9jbsgfjvcNQgJswEOOz O5j4/ZB9vXToccfKBcvAqTa2D31EcVC5BXASzUhUZsJJAjLC2ypv8zuXrVLpDcnk JQjclJ4uM6bT+BPxWZLKMexQAXt/XnTrHt5HbHXXSN7Q3JBe5erToMomZw7Z22E4 OhCi9k5oT+T8WTpJc7l80wIuvcNum+c0fLC+RY2qOK29LA3yTpH56zR0KmB2pxI= =ADz4 -----END PGP SIGNATURE----- --OmL7C/BU0IhhC9Of--