Re: Soft-Updates for Linux ?

From: Daniel Phillips (news-innominate.list.linux.kernel@innominate.de)
Date: Mon Oct 02 2000 - 17:20:19 EST


Ralf Baechle wrote:
>
> On Sun, Oct 01, 2000 at 10:21:34AM -0500, Robert Redelmeier wrote:
> > You boys and girls don't try this at home on Linux! The ext2 fsck is horrible
> > after a powerfail, and I've lost superblocks and had to re-install :( .
>
> There is actually some indication that part of the corruption people observe
> after powerfails is caused by hardware scribbling junk data over the disk
> in the very last moment when power levels in the system are already so low
> that memory is already starting to fail while I/O hardware is still doing
> their best to write junk data to the disk. These days powerfails are rare
> and so it's easy to attribute that to something else.

It would must be so easy to inhibit the write head on losing the
power-good signal, or perhaps trying to hang in there until the end of
the current write. ??There is a power-good signal on a PC isn't there??
So, which drives don't do this (so I can be sure not to buy one) and
which do?

Tux2 deals with the possibility of a bad write in the last block by
checkpointing each new metaroot and writing it to a location different
from the last one (waaaay far away). This assumes that only the last
block written has a chance of getting random scribbles in it. If it's
possible to get random scribbles in places other than the last block,
the only reasonable solution I can think of is throwing away the drive.

I'd be happy if someone would point me at some low-level engineering
info along these lines so I can really get down and dirty in my
analysis. I tend to take a programmer's view of these things and assume
that the logical way is the way they've actually been designed, but
that's just isn't always the case.

> Maybe it's time to implement support for power fail / power return interrupts
> where supported by hardware. At least on Indy that gives you ~ 10ms to
> stop whatever is going on before power finally fails.

With Tux2 all you need is an iret there.

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



This archive was generated by hypermail 2b29 : Sat Oct 07 2000 - 21:00:11 EST