From: Theodore Ts'o Date: Tue, 20 Jan 2009 06:50:07 +0000 (-0500) Subject: tune2fs: Don't allow the -I option if the flex_bg feature is enabled X-Git-Tag: v1.41.4~16 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=5bf81baea01a19ce48daee5db07f08c6a9655ab5;p=tools%2Fe2fsprogs.git tune2fs: Don't allow the -I option if the flex_bg feature is enabled With flex_bg usually the inode table for most block groups are packed right against each other, so expanding the inode table size needs special handling that's not currently in tune2fs. Signed-off-by: "Theodore Ts'o" --- diff --git a/misc/tune2fs.c b/misc/tune2fs.c index e72518a..14529e3 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -1409,7 +1409,7 @@ static int tune2fs_setup_tdb(const char *name, io_manager *io_ptr) set_undo_io_backing_manager(*io_ptr); *io_ptr = undo_io_manager; set_undo_io_backup_file(tdb_file); - printf(_("To undo the tune2fs operations please run " + printf(_("To undo the tune2fs operation please run " "the command\n e2undo %s %s\n\n"), tdb_file, name); free(tmp_name); @@ -1652,6 +1652,13 @@ retry_open: "unmounted.\n"), stderr); exit(1); } + if (fs->super->s_feature_incompat & + EXT4_FEATURE_INCOMPAT_FLEX_BG) { + fputs(_("Changing the inode size not supported for filesystems " + "with the flex_bg\nfeature enabled.\n"), + stderr); + exit(1); + } /* * We want to update group descriptor also * with the new free inode count