Re: Corruption caused by umount not flushing the buffer cache.

From: Andrea Arcangeli (andrea@suse.de)
Date: Tue Jan 25 2000 - 06:25:48 EST


On Mon, 24 Jan 2000, James Bottomley wrote:

> [..] I
>believe this only affects storage which is shared between boxes either on a
>SCSI bus or a SAN, but it's biting me: [..]

flushb the blockdevice before accessing it the second time, if you share
the same big blackbox masqueraded as a scsi disk across multiple scsi
adapters.

Doing the flush on umount won't help you if you for example did an fsck
before start using the disk on another SCSI controller (potentially in
another machine).

>the unmount but this strikes me as a bug in the linux umount semantics which
>will bite more people than just me as linux enters the SAN arena.

If you need to access the device only from some specific application you
probably want to use rawio and alloc the cache in userspace memory and
handle cache coherency via tcp, each time you write a block you should
invalidate such block in all the user-caches of all other clients. That
could be handled cleanly with a LGPL library.

Use Stephen's rawio (with some recent fixes from me) that I included into
2.2.14aa2 if you need rawio in 2.2.x:

        ftp://ftp.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.2/2.2.14aa2.gz

Andrea

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



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:14 EST