lkml.org 
[lkml]   [2008]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Patch] document ext3 requirements (was Re: [RFD] Incremental fsck)
From
Date
>The "disk motor as a generator" tale may not be purely folklore.  When
>an IDE drive is not in writeback mode, something special needs to done
>to ensure the last write to media is not a scribble.

No it doesn't. The last write _is_ a scribble. Systems that make atomic
updates to disk drives use a shadow update mechanism and write the master
sector twice. If the power fails in the middle of writing one, it will
almost certainly be unreadable due to a CRC failure, and the other one
will have either the old or new master block contents.

And I think there's a problem with drives that, upon sensing the
unreadable sector, assign an alternate even though the sector is fine, and
you eventually run out of spares.


Incidentally, while this primitive behavior applies to IDE (ATA et al)
drives, that isn't the only thing people put filesystem on. Many
important filesystems go on higher level storage subsystems that contain
IDE drives and cache memory and batteries. A device like this _does_ make
sure that all data that it says has been written is actually retrievable
even if there's a subsequent power outage, even while giving the
performance of writeback caching.

--
Bryan Henderson IBM Almaden Research Center
San Jose CA Filesystems



\
 
 \ /
  Last update: 2008-01-16 20:09    [W:0.225 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site