From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KLB2B-0004ko-JL for qemu-devel@nongnu.org; Tue, 22 Jul 2008 02:07:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KLB29-0004k1-Px for qemu-devel@nongnu.org; Tue, 22 Jul 2008 02:07:39 -0400 Received: from [199.232.76.173] (port=44652 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KLB29-0004jo-LL for qemu-devel@nongnu.org; Tue, 22 Jul 2008 02:07:37 -0400 Received: from il.qumranet.com ([212.179.150.194]:28060) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KLB28-0004ee-TR for qemu-devel@nongnu.org; Tue, 22 Jul 2008 02:07:37 -0400 Message-ID: <48857926.5020708@qumranet.com> Date: Tue, 22 Jul 2008 09:07:34 +0300 From: Avi Kivity 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> In-Reply-To: <48850A99.7070005@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: > 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. Journalling is so out of fashion. It's better to sequence the operations so that failure results in a leak instead of corruption. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.