From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KL4DO-0008AN-U6 for qemu-devel@nongnu.org; Mon, 21 Jul 2008 18:50:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KL4DM-0008A8-7K for qemu-devel@nongnu.org; Mon, 21 Jul 2008 18:50:45 -0400 Received: from [199.232.76.173] (port=57679 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KL4DM-0008A4-20 for qemu-devel@nongnu.org; Mon, 21 Jul 2008 18:50:44 -0400 Received: from yw-out-1718.google.com ([74.125.46.154]:12124) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KL4DL-0007tT-Pk for qemu-devel@nongnu.org; Mon, 21 Jul 2008 18:50:43 -0400 Received: by yw-out-1718.google.com with SMTP id 6so730774ywa.82 for ; Mon, 21 Jul 2008 15:50:43 -0700 (PDT) Message-ID: <488512A2.8030805@codemonkey.ws> Date: Mon, 21 Jul 2008 17:50:10 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] qcow2 - safe on kill? safe on power fail? References: <47CF0E0C.9030807@quinthar.com> <47CF16C5.6040102@codemonkey.ws> <20080721181031.GA31773@shareable.org> <4884E6F1.5020205@codemonkey.ws> <48850A99.7070005@codemonkey.ws> <48850C22.1000801@quinthar.com> In-Reply-To: <48850C22.1000801@quinthar.com> 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 David Barrett wrote: > Anthony Liguori wrote: >> Andreas Schwab wrote: >>> Anthony Liguori writes: >>> >>>> The only ways that you can cause corruption is if the QCOW2 sector >>>> allocation code is faulty (and you would be screwed no matter what >>>> here) >>>> or if you issue a SIGTERM/SIGKILL that interrupts the code while it's >>>> allocating a new sector. >>> >>> Blocking SIGTERM until the allocation is finished could close that >>> hole. >> >> Seems like a band-aid to me as SIGKILL is still an issue. Plus it >> would involve modifying all disk formats, not just QCOW2. I'd rather >> see proper journal support added to QCOW2 myself. > > Well, SIGKILL is a bit more of an extreme case. SIGTERM seems like a > reasonable way to trigger a graceful shutdown (at least, I know I > assumed it did for a long time, whereas I'd never assume SIGKILL was > graceful). It would probably be reasonable to trap SIGTERM and to have it trigger the equivalent of the "quit" command in the monitor. Right now, SIGTERM will not result in a graceful shutdown of QEMU. Regards, Anthony Liguori > -david > > >