Re: safe file systems

Michael Weller (eowmob@exp-math.uni-essen.de)
Thu, 25 Sep 1997 11:10:48 +0200 (MESZ)


On Wed, 24 Sep 1997, Chris Wedgwood wrote:

> From: Larry McVoy <lm@linux.cobaltmicro.com>
> To: linux-kernel@vger.rutgers.edu
> Subject: safe file systems

[...]

> Also, your writes have to be very strictly ordered. Some intelligent IO
> subsystems will reorder your write operations on you, which I guess could
> cause lots of really obscure hard to track down funnies if you were unaware
> of you IO doing this.
>
> A DPT SCSI card with 64MB of ram (probably with less too) I'm fairly sure
> does this. (Create a file several GB long, and then update the ends of the

[...]

> I think even my cheapish SCSI disks (which have a 1 (maybe 2?) MB cache)
> will do this. I assume here a system reset will not affect them, but
-----------------------------------
I won't bet on this.

> power-failure did last time I checked. (But you can twiddle with the tables
> on them and modify the way it writes data back, etc).

But such twiddling would be disk/vendor dependant and ugly to implement in
a generic kernel. However, there is a well documented SCSI-II command (I'd
need to look the name up in my specs at home) to instruct a disk to flush
all it's buffers NOW. It could be issued on a regular basis and ensure a
consistent data image on the disk in conjunction with some journaling.
Now, disks are not REQUIRED to have it, unfortunately.

BTW, I always wondered why it is not issued upon final close of an
SCSI-disk after unmounting.

Buffering SCSI controllers with several megs of RAM are evil by
definition. Noone knows when they'll decide to flush their buffers which
can be a quite longish process when they have so much memory. They are a
piggyback auxiliary processor on an extension board to hide some DOS
deficiencies, namely the lack of proper disk handling (and it dares to
call itself disk operating system.. Yuck). They even cause problems in DOS
on shutdown, (well when you switch the machine off, that is) as far as I
read in literature; they've nothing lost in a multi tasking OS. Just add
this memory to the main system and let the OS manage the buffers.

Michael.

(eowmob@exp-math.uni-essen.de or eowmob@pollux.exp-math.uni-essen.de
Please do not use my vm or de0hrz1a accounts anymore. In case of real
problems reaching me try mat42b@spi.power.uni-essen.de instead.)