[lkml]   [1998]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: scary ext2 filesystem question
On Fri, Dec 25, 1998 at 11:42:57AM -0500, Mirian Crzig Lennox wrote:
> I was reading a book on filesystem design, and came across the
> following scary quote:
> "The main difference between ext2 and FFS is that ext2 makes no
> guarantee about consistency of the file system or whether an operation
> is permanently on the disk when the file system call completes.
> [...] This consistency model is not without drawbacks and may not be
> appropriate at all for some applications. Because ext2 makes no
> guarantee about the order of operations and when they are flushed to
> disk, it is conceivable (although unlikely) that later modifications
> to the file system would be recorded on disk but earlier operations
> would not be. Although the file system consistency check would
> ensure that the file system is consistent, the lack of ordering on
> operations can lead to confused applications or, even worse, crashing
> applications because of the inconsistencies in the order of
> modifications to the file system."
> _Practical File System Design_, Dominic Giampaolo, p. 36

The ext2fs uses write cacheing, like any powerful filesystem does.
This cannot confuse any program. Any program that reads data from the disk
goes through the page cache, so it get's the recent data, whether it was
wriotten to disk yet, or not yet. It is guaranteed to be written to disk
sometime, thats what bdflush/update and kswapd are for. Un unmounting the fs
all buffers are flushed, even if you managed to kill your bdflush before.

You can design an application to get confused, if you really want to: Write
data to a disk using a filesystem on the normal disk device (/dev/sdX) and
try to read it back via raw SCSI commands to /dev/sgX. You can do fancy
things, if you are root, really!

I noted the name of the author in my ignore list ... obviuosly he did not
understand anything!

Kurt Garloff <> [Dortmund, FRG]
Plasma physics, high perf. computing [Linux-ix86,-axp, DUX]
PGP key on [Linux SCSI driver: DC390]

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:46    [W:0.085 / U:42.656 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site