From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOSSK-0002Sz-Bd for qemu-devel@nongnu.org; Mon, 01 Sep 2014 10:19:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOSSD-0006eI-Rm for qemu-devel@nongnu.org; Mon, 01 Sep 2014 10:19:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61489) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOSSD-0006eA-Iw for qemu-devel@nongnu.org; Mon, 01 Sep 2014 10:19:33 -0400 Date: Mon, 1 Sep 2014 15:19:28 +0100 From: "Richard W.M. Jones" Message-ID: <20140901141928.GW1302@redhat.com> References: <20140830145313.GN14001@redhat.com> <20140901144102.0aaae712@bahia.local> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="+RqgOR8y65RRYhVY" Content-Disposition: inline In-Reply-To: <20140901144102.0aaae712@bahia.local> Subject: Re: [Qemu-devel] qcow2, lazy_refcounts and killing qemu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz Cc: kwolf@redhat.com, qemu-devel@nongnu.org --+RqgOR8y65RRYhVY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline A test case, attached. Note that you have to look at the output of the final qemu-img info command. In the case where it goes wrong, the 'backing file:' and 'backing file format:' lines disappear completely. In the case where the bug is not reproduced, these lines are still present. It's 100% reproducible for me when lazy_refcounts=on, and 0% reproducible when lazy_refcounts=off. BUT it only occurs if the backing file is a remote source (nbd:... in this case), not if the backing file is a plain file. Make of that what you will. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top --+RqgOR8y65RRYhVY Content-Type: application/x-sh Content-Disposition: attachment; filename="qemu-lazy-refcounts.sh" Content-Transfer-Encoding: quoted-printable #!/bin/bash -=0A=0A# Try turning lazy_refcounts on or off here.=0Aoptions= =3D'compat=3D1.1,backing_fmt=3Draw,lazy_refcounts=3Don'=0A#options=3D'compa= t=3D1.1,backing_fmt=3Draw'=0A=0A# Try using direct qemu or via libvirt or d= istro default.=0A#export LIBGUESTFS_BACKEND=3Ddirect=0A#export LIBGUESTFS_B= ACKEND=3Dlibvirt=0A=0Acd /tmp=0Arm -f test1.img=0Akillall qemu-nbd=0A=0Aset= -x=0Aset -e=0A=0A# Create test filesystem (test1.img).=0Aguestfish -N fs e= xit=0A=0A# Serve it over nbd.=0Aqemu-nbd -r -t -f raw test1.img &=0Asleep 2= =0A=0A# Create overlay.=0Aqemu-img create -f qcow2 -b nbd:localhost:10809 -= o $options overlay.qcow2=0A=0A# Write stuff to the overlay.=0Aguestfish <