>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

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

Reply via email to