Whoops, of course, only if the power goes out.  But then, this is still a
serious problem.

Peter



> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Matthew
> Kirkwood
> Sent: Wednesday, August 18, 1999 10:20 AM
> To: Peter J. Braam
> Cc: [EMAIL PROTECTED]; Michael J. Callahan
> Subject: Re: disk write reordering, ext2 and security
>
>
> 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.
>
> I may be wrong, but I'd guess that the kernel wouldn't release the
> buffers it was sending to disk until the driver (controller/disk)
> reported success.
>
> Any metadata (and data) which might be incorrect on disk will be
> locked in kernel memory as buffers/caches won't it?
>
> Or did I misread your question?
>
> Matthew.
>

Reply via email to