Ok, your patch works in this case (it is leaving sb->s_dirt = 1, however, so
the superblock will be written out again shortly). In fact, the whole
thing can be replaced with a call to ext2_write_super() in my code, which
also turns off EXT2_VALID_FS and sets s_mtime, and writes it synchronously
to disk. This means we can remove 2! lines from ext2_setup_super().
It makes me wonder, though, if we clear EXT2_VALID_FS synchronously in
ext2_setup_super() if we also need it in ext2_write_super(). If people
mount their root fs read-write e2fsck will clear EXT2_VALID_FS and we
may never hit ext2_setup_super() again to clear it, so I guess it needs
to stay there.
One of the other changes from my patch is that errors are also written
out synchronously to disk, for the same reason - in case we crash shortly
after having an error, and before dirty buffers are flushed to disk.
Cheers, Andreas
-- Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto, \ would they cancel out, leaving him still hungry?" http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/