summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2007-06-18 18:26:50 -0400
committerTheodore Ts'o <tytso@mit.edu>2007-06-18 18:26:50 -0400
commit058ad1c70c9a097d282270c6f76d3c3493e15fe2 (patch)
tree7d7de5e92a3b3e83e80b6be18a1e0281168350d7 /misc
parent5267a520bb7887b146f05ffa8726664afbb6c3c2 (diff)
downloade2fsprogs-058ad1c70c9a097d282270c6f76d3c3493e15fe2.tar.gz
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>
Diffstat (limited to 'misc')
-rw-r--r--misc/ChangeLog6
-rw-r--r--misc/tune2fs.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/misc/ChangeLog b/misc/ChangeLog
index 5b680c5f..d1b4b795 100644
--- a/misc/ChangeLog
+++ b/misc/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-12 Theodore Tso <tytso@mit.edu>
+
+ * tune2fs.c (main): Clear the EXT2_FLAG_MASTER_SB_ONLY flag
+ because we want tune2fs changes to get written to the
+ backup blocks.
+
2007-06-04 Theodore Tso <tytso@mit.edu>
* badblocks.c (main): Fix error checking of the last-block and
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 967b5893..833b9943 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -780,6 +780,7 @@ int main (int argc, char ** argv)
exit(1);
}
sb = fs->super;
+ fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
if (print_label) {
/* For e2label emulation */
printf("%.*s\n", (int) sizeof(sb->s_volume_name),