[EMAIL PROTECTED] (Neal H. Walfield) writes: > > ext2fs should be quite robust: Even pulling the plug at any time should not > > corrupt the filesystem beyond what e2fsck can repair. > > Let us assume that ext2fs writes a block of metadata to disk. In the > kernel, in the middle of the DMA operation, the kernel panics. There > is no guarantee that e2fsck will be able to handle this case.
But it *can* make sure that e2fsck can repair the result. > In other words, although a write operation may appear atomic to > ext2fs, in the kernel, that operation is composed of many smaller > atomic operations (with respect to the hardware) during any of which, > the kernel may crash. Disk hardware guarantees that a sector write can always be completed even if the power goes out partway through. That means that writing a single sector *is* always atomic. Thomas