From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jyoxm-0000Ao-Lj for qemu-devel@nongnu.org; Wed, 21 May 2008 10:06:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jyoxj-0008V2-OS for qemu-devel@nongnu.org; Wed, 21 May 2008 10:06:41 -0400 Received: from [199.232.76.173] (port=59252 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jyoxj-0008Un-Bu for qemu-devel@nongnu.org; Wed, 21 May 2008 10:06:39 -0400 Received: from py-out-1112.google.com ([64.233.166.180]:14045) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jyoxj-0000XM-AU for qemu-devel@nongnu.org; Wed, 21 May 2008 10:06:39 -0400 Received: by py-out-1112.google.com with SMTP id p76so169093pyb.10 for ; Wed, 21 May 2008 07:06:38 -0700 (PDT) Message-ID: <48342C66.9080407@codemonkey.ws> Date: Wed, 21 May 2008 09:06:30 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_DIRECT) References: <1211283126.4314.70.camel@frecb07144> <48332AB9.3010707@codemonkey.ws> <20080520223602.GE27853@shareable.org> <48337444.2070203@codemonkey.ws> <20080521011915.GC595@shareable.org> <48338522.7030306@codemonkey.ws> <0BD236FF-3907-4A00-B32A-158C7E538452@web.de> In-Reply-To: <0BD236FF-3907-4A00-B32A-158C7E538452@web.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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 Andreas Färber wrote: > > Am 21.05.2008 um 04:12 schrieb Anthony Liguori: > >> Jamie Lokier wrote: >>> What do you imagine happens when you pull the power in the middle of >>> writing a sector to a floppy disk (to pick a more easily imagined >>> example)? >>> >>> There is not enough residual power to write the rest of the sector. >>> That sector's checksum will therefore be corrupt, and (hopefully) have >>> a CRC read error. It can be written over again, wiping the CRC error. >>> >> >> Why would the sector's checksum be corrupt? The checksum wouldn't >> change after the data write. > > If you change part of the data but leave the checksum as-is, you'd > hopefully get a checksum mismatch... ;) That's the point though, you're not changing part of the data. You're rewriting the same data. I don't think the checksum gets automatically invalidated whenever data is written to the disk. Regards, Anthony Liguori > Andreas > >