Hi,

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!

What am I missing here?

- Peter -

Reply via email to