From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTgHS-0000qA-4z for qemu-devel@nongnu.org; Fri, 28 Mar 2014 19:33:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTgHL-0007yb-5T for qemu-devel@nongnu.org; Fri, 28 Mar 2014 19:33:46 -0400 Message-ID: <533606CD.9080602@redhat.com> Date: Sat, 29 Mar 2014 00:33:33 +0100 From: Max Reitz MIME-Version: 1.0 References: <1395835569-21193-1-git-send-email-stefanha@redhat.com> <1395835569-21193-42-git-send-email-stefanha@redhat.com> In-Reply-To: <1395835569-21193-42-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-2.0 41/47] qcow2: Fix copy_sectors() with VM state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Kevin Wolf , pmatouse@redhat.com, qemu-stable@nongnu.org On 26.03.2014 13:06, Stefan Hajnoczi wrote: > From: Kevin Wolf > > bs->total_sectors is not the highest possible sector number that could > be involved in a copy on write operation: VM state is after the end of > the virtual disk. This resulted in wrong values for the number of > sectors to be copied (n). > > The code that checks for the end of the image isn't required any more > because the code hasn't been calling the block layer's bdrv_read() for a > long time; instead, it directly calls qcow2_readv(), which doesn't error > out on VM state sector numbers. > > Signed-off-by: Kevin Wolf > --- > block/qcow2-cluster.c | 9 --------- > tests/qemu-iotests/029 | 22 ++++++++++++++++++++-- > tests/qemu-iotests/029.out | 13 +++++++++++++ > 3 files changed, 33 insertions(+), 11 deletions(-) Reviewed-by: Max Reitz