qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_D


From: Jamie Lokier
Subject: Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_DIRECT)
Date: Wed, 21 May 2008 12:43:57 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Anthony Liguori wrote:
> >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.

Changing part of the data invalidates a CRC...

Also don't forget:

> >This is because the way data is recorded does not encode each bit
> >separately, but multiplexes them together for modulation, and also
> >because bit timing is not exact.

Inexact bit timing means the bits are not written exactly over the
previous bits, so there's a mismatch if you abort in the middle even
if all the bits are identical.

Finally, some kinds of data modulation use random numbers too, to
make the stored power spectrum independent of what data you are writing.

> Modern *enterprise* hard disks have battery backed caches so read/write 
> operations always complete or fail.

True.  And some have flash - when the battery or capacitor is low,
they can write to flash.

> Low-end disks don't tend to have battery backed caches but AFAIK,
> rewriting the same data will not result in any sort of disk corruption.

There's only one way to find out for sure... do the tests.  Or ask the
manufacturers, maybe they know.  Or ask Oracle, perhaps they have done
these tests.

-- Jamie




reply via email to

[Prev in Thread] Current Thread [Next in Thread]