Received: from eggs.gnu.org ([2001:4830:134:3::10]:37181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPQ7R-0004Lg-8L for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:11:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPQ7N-0006Wg-BN for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:11:09 -0400 Received: from indium.canonical.com ([91.189.90.7]:57664) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPQ7N-0006WW-5P for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:11:05 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1bPQ7M-0004Ct-GW for ; Tue, 19 Jul 2016 08:11:04 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 7B6592E80C7 for ; Tue, 19 Jul 2016 08:11:04 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Tue, 19 Jul 2016 08:03:16 -0000 From: "T. Huth" <1103868@bugs.launchpad.net> Reply-To: Bug 1103868 <1103868@bugs.launchpad.net> Sender: bounces@canonical.com References: <20130124080844.1682.67797.malonedeb@gac.canonical.com> Message-Id: <20160719080316.4403.30833.malone@wampee.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1103868] Re: drive_mirror crashes on full disk copy of a resized disk with a backing file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Patch has been included here: http://git.qemu.org/?p=3Dqemu.git;a=3Dcommitdiff;h=3D63ba17d39f1a8d262b31e ... so I think it's OK to close this bug now. ** Changed in: qemu Status: In Progress =3D> Fix Released -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1103868 Title: drive_mirror crashes on full disk copy of a resized disk with a backing file Status in QEMU: Fix Released Bug description: This bug was discovered using libvirt on ubuntu with a build of qemu 1.3 but it is trivailly reproducible with the curent git version. Repro steps: qemu-img create -f qcow2 base 32M qemu-img create -f qcow2 -o backing_file=3Dbase disk qemu-img resize /home/vishvananda/disk 64M qemu-system-x86_64 -drive file=3Ddisk,id=3Dvda -vnc :1 -monitor stdio QEMU 1.3.0 monitor - type 'help' for more information (qemu) drive_mirror -f vda test Formatting 'test', fmt=3Dqcow2 size=3D67108864 encryption=3Doff cluster_s= ize=3D65536 lazy_refcounts=3Doff = qemu-system-x86_64: /build/buildd/qemu-1.3.0+dfsg/block/mirror.c:129: mir= ror_run: Assertion `n > 0' failed. Aborted Note that the command works just fine if the front image is not resized: qemu-img create -f qcow2 base 32M qemu-img create -f qcow2 -o backing_file=3Dbase disk qemu-system-x86_64 -drive file=3Ddisk,id=3Dvda -vnc :1 -monitor stdio or if the backing file is resized as well: qemu-img create -f qcow2 base 32M qemu-img create -f qcow2 -o backing_file=3Dbase disk qemu-img resize /home/vishvananda/disk 64M qemu-img resize /home/vishvananda/base 64M qemu-system-x86_64 -drive file=3Ddisk,id=3Dvda -vnc :1 -monitor stdio or if we don't use -f when creating the mirror: QEMU 1.3.0 monitor - type 'help' for more information (qemu) drive_mirror vda test Formatting 'test', fmt=3Dqcow2 size=3D33554432 backing_file=3D'base' back= ing_fmt=3D'qcow2' encryption=3Doff cluster_size=3D65536 lazy_refcounts=3Dof= f = although in this final case the mirror is created the same size as the backing file which seems wrong: qemu-img info test image: test file format: qcow2 virtual size: 32M (33554432 bytes) disk size: 196K cluster_size: 65536 backing file: base backing file format: qcow2 To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1103868/+subscriptions