Whamcloud - gitweb
Don't write changes to the backup superblocks by default
authorTheodore Ts'o <tytso@mit.edu>
Mon, 18 Jun 2007 22:26:50 +0000 (18:26 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 18 Jun 2007 22:26:50 +0000 (18:26 -0400)
commit058ad1c70c9a097d282270c6f76d3c3493e15fe2
tree7d7de5e92a3b3e83e80b6be18a1e0281168350d7
parent5267a520bb7887b146f05ffa8726664afbb6c3c2
Don't write changes to the backup superblocks by default

This patch changes ext2fs_open() to set EXT2_FLAG_MASTER_SB_ONLY by
default.  This avoids some problems in e2fsck (reported by Jim Garlick)
where a corrupt journal can end up writing the bad superblock to the
backups.  In general, only e2fsck (after the filesystem is clean),
tune2fs, and resize2fs should change the backup superblocks by default.
Most callers of ext2fs_open() should not be touching anything where the
backups should be touched.  So let's change the defaults to avoid
potential problems.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
e2fsck/ChangeLog
e2fsck/journal.c
e2fsck/unix.c
lib/ext2fs/ChangeLog
lib/ext2fs/openfs.c
misc/ChangeLog
misc/tune2fs.c
resize/ChangeLog
resize/resize2fs.c