Re: [Patch] document ext3 requirements (was Re: [RFD] Incrementalfsck)

From: linux-os (Dick Johnson)
Date: Fri Jan 18 2008 - 10:35:15 EST



On Fri, 18 Jan 2008, Theodore Tso wrote:

> On Thu, Jan 17, 2008 at 04:31:48PM -0800, Bryan Henderson wrote:
>> But I heard some years ago from a disk drive engineer that that is a myth
>> just like the rotational energy thing. I added that to the discussion,
>> but admitted that I haven't actually seen a disk drive write a partial
>> sector.
>
> Well, it would be impossible or at least very hard to see that in
> practice, right? My understanding is that drives do sector-level
> checksums, so if there was a partially written sector, the checksum
> would be bogus and the drive would return an error when you tried to
> read from it.
>
>> Ted brought up the separate issue of the host sending garbage to the disk
>> device because its own power is failing at the same time, which makes the
>> integrity at the disk level moot (or even undesirable, as you'd rather
>> write a bad sector than a good one with the wrong data).
>
> Yep, exactly. It would be interesting to see if this happens on
> modern hardware; all of the evidence I've had for this is years old at
> this point.
>
> - Ted

I have a Seagate Barracuda 7200.9 80 Gbyte SATA drive that I
use for experiments. I can permanently destroy a EXT3 file-system
at least 50% of the time by disconnecting the data cable while
a `dd` write to a file is in progress. Something bad happens
making partition information invalid. I have to re-partition
to reuse the drive.

If I try the same experiment by disconnecting power to the drive
the file is no good (naturally), but the rest of the file-system
is fine.

My theory is that the destination offset is present in every
SATA access and some optimization code within the drive sets
the heads to track zero and writes before any CRC or checksum
is done to find out if it was the correct offset with the
correct data!

Cheers,
Dick Johnson
Penguin : Linux version 2.6.22.1 on an i686 machine (5588.29 BogoMips).
My book : http://www.AbominableFirebug.com/
_


****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@xxxxxxxxxxxx - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/