From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JXA5w-0001Op-R6 for qemu-devel@nongnu.org; Thu, 06 Mar 2008 02:00:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JXA5r-0001JM-Jr for qemu-devel@nongnu.org; Thu, 06 Mar 2008 02:00:47 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXA5r-0001J5-CJ for qemu-devel@nongnu.org; Thu, 06 Mar 2008 02:00:43 -0500 Received: from bzq-179-150-194.static.bezeqint.net ([212.179.150.194] helo=il.qumranet.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JXA5q-0007xe-Df for qemu-devel@nongnu.org; Thu, 06 Mar 2008 02:00:43 -0500 Message-ID: <47CF95D2.4070704@qumranet.com> Date: Thu, 06 Mar 2008 08:57:22 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] Signal handling and qcow2 image corruption References: <47CF0E0C.9030807@quinthar.com> <47CF16C5.6040102@codemonkey.ws> In-Reply-To: <47CF16C5.6040102@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Anthony Liguori wrote: > David Barrett wrote: >> I'm tracking down a image corruption issue and I'm curious if you can >> answer the following: >> >> 1) Is there any difference between sending a "TERM" signal to the >> QEMU process and typing "quit" at the monitor? > > Yes. Since QEMU is single threaded, when you issue a quit, you know > you aren't in the middle of writing qcow2 meta data to disk. > That's not enough. If you write a metadata pointer before allocating and writing the block, and you terminate between these two operations, the next write allocation will leave two pointers pointing to the same block. I don't know if qemu is susceptible to this. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.