From 5bf81baea01a19ce48daee5db07f08c6a9655ab5 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 20 Jan 2009 01:50:07 -0500 Subject: [PATCH] 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" --- misc/tune2fs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- 1.8.3.1