From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNk1s-0004cY-Gb for qemu-devel@nongnu.org; Sat, 30 Aug 2014 10:53:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNk1k-0005sN-RX for qemu-devel@nongnu.org; Sat, 30 Aug 2014 10:53:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNk1k-0005qt-Jv for qemu-devel@nongnu.org; Sat, 30 Aug 2014 10:53:16 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7UErFTG010786 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Sat, 30 Aug 2014 10:53:15 -0400 Date: Sat, 30 Aug 2014 15:53:13 +0100 From: "Richard W.M. Jones" Message-ID: <20140830145313.GN14001@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] qcow2, lazy_refcounts and killing qemu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com I found out a few days ago that if you: (1) Open a qcow2 file that has lazy_refcounts = on and a backing file, and (2) Write lots of stuff, and (3) Kill qemu with SIGTERM [which I believed, maybe incorrectly, is a "nice" way to kill qemu] .. then you can end up with a corrupt qcow2 file. In particular the qcow2 file sometimes forgot that it had a backing file, but I suspect this was just a symptom and in fact the qcow2 file header wasn't being written to disk correctly. Is it correct that sending SIGTERM to qemu should kill it cleanly, or is that no longer the case, or is lazy_refcounts a special case, or have I found a bug? I can reproduce this easily, although of course the reproducer will involve libguestfs. 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