summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2005-01-28 11:45:28 -0500
committerTheodore Ts'o <tytso@mit.edu>2005-01-28 11:45:28 -0500
commitea774315631accb05e2407765c6b448d648d14d6 (patch)
treeb2d3a57b696bcd89e0b78978c3d8f8155ceeb1d5 /misc
parent7e0282c5f21add344b306876ca999aecd4d5fd0c (diff)
downloade2fsprogs-ea774315631accb05e2407765c6b448d648d14d6.tar.gz
Fix two bugs found by the regression test suites. The bug was created when
we changed ext2fs_create_resize_inode to always create the resize inode, even when s_reserved_gdt_blocks is zero. Mke2fs and e2fsck was calling ext2fs_create_resize_inode() unconditionally, and depending on s_reserved_gdt_blocks to be zero, instead of explicitly checking the resize_inode feature.
Diffstat (limited to 'misc')
-rw-r--r--misc/ChangeLog5
-rw-r--r--misc/mke2fs.c11
2 files changed, 12 insertions, 4 deletions
diff --git a/misc/ChangeLog b/misc/ChangeLog
index 71959296..8fcbf5d1 100644
--- a/misc/ChangeLog
+++ b/misc/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-28 Theodore Ts'o <tytso@mit.edu>
+
+ * mke2fs.c (main): Only call create_resize_inode if the resize
+ feature is actually enabled.
+
2005-01-27 Theodore Ts'o <tytso@mit.edu>
* blkid.c (main, compare_search_type): Make blkid -t work more
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 03d163bd..456a471f 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -1542,11 +1542,14 @@ int main (int argc, char *argv[])
create_lost_and_found(fs);
reserve_inodes(fs);
create_bad_block_inode(fs, bb_list);
- retval = ext2fs_create_resize_inode(fs);
- if (retval) {
- com_err("ext2fs_create_resize_inode", retval,
+ if (fs->super->s_feature_compat &
+ EXT2_FEATURE_COMPAT_RESIZE_INODE) {
+ retval = ext2fs_create_resize_inode(fs);
+ if (retval) {
+ com_err("ext2fs_create_resize_inode", retval,
_("while reserving blocks for online resize"));
- exit(1);
+ exit(1);
+ }
}
}