qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qcow2, lazy_refcounts and killing qemu
@ 2014-08-30 14:53 Richard W.M. Jones
  2014-09-01 12:41 ` Greg Kurz
  2014-09-05 15:39 ` Stefan Hajnoczi
  0 siblings, 2 replies; 11+ messages in thread
From: Richard W.M. Jones @ 2014-08-30 14:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-09-08 18:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-30 14:53 [Qemu-devel] qcow2, lazy_refcounts and killing qemu Richard W.M. Jones
2014-09-01 12:41 ` Greg Kurz
2014-09-01 13:07   ` Richard W.M. Jones
2014-09-01 14:19   ` Richard W.M. Jones
2014-09-01 14:23     ` Richard W.M. Jones
2014-09-01 14:30     ` Greg Kurz
2014-09-05 15:39 ` Stefan Hajnoczi
2014-09-05 17:41   ` Richard W.M. Jones
2014-09-08  7:16     ` Markus Armbruster
2014-09-08 18:29       ` Max Reitz
2014-09-08  9:57     ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).