Re: IDE DMA errors, massive disk corruption: Why? Fixed Yet? Why not re-do failed op?

From: Valdis . Kletnieks
Date: Mon Oct 06 2003 - 15:48:12 EST


On Mon, 06 Oct 2003 16:20:42 EDT, "Daniel B." said:

> Are you sure? If you issue a write to block 1 and then issue another
> write to block 1, it would have to guarantee the relative order of those
> writes (or equivalent optimization in the write cache), wouldn't it?

If the old 'block 1' data is still in the write cache, then another write
should overlay it - that's a very basic optimization. Consider the case of a
very active block that has a popular inode that's being atime-updated a lot (or
whatever causes a lot of activity - ignore the in-memory cache and sync/fsync
for the moment). You really don't want 34 writes to the same block taking up 34
blocks of space in the write cache....

The ordering issue comes when the following type of thing happens:

1) a write for block 993 is issued (metadata, perhaps)
2) a write for block 10934 is issued - actual file contents or something that
depends on 993 being written.
3) Disk writes 10934 out.
4) Things go bad (power hit, whatever) before 993 gets written out.
5) fsck. ;)

Attachment: pgp00001.pgp
Description: PGP signature