On Wed, 18 Aug 1999, Matthew Kirkwood wrote:

> On Wed, 18 Aug 1999, Peter J. Braam wrote:
> 
> > I've recently learned that disks sometimes reorder writes (I think the
> > SCSI models do it).
> >
> > If we look at how the buffers are flushed for ext2 files, then the
> > system is (fs/buffer.c)
> >
> > flush data buffers
> > write super block to buffers
> > write inodes to buffers
> > flush data buffers again
> >
> > The bdflush daemon does NOT require a wait after the first flush of
> > buffers, so a smart disk, i.e. one that re-orders writes, may write an
> > inode for a file while new block have not yet been written.
> >
> > This means that this file could see data that once belonged to someone
> > else -- a true nono!
> 
> Only if the power goes out, I think.

Yes, that's exactly the point.  If the power doesn't go out, practically
any ordering will work!

Michael


Reply via email to