Skip to contentSkip to conversation

tune2fs: Don't allow tune2fs -I if flex_bg on

PATCH New Peng Tao 1 participant 1 message Dec 10, 2008

lore
Share & tools
lore

Peng Tao

author
#0 lore raw

PATCH 2/3 tune2fs: Don't allow tune2fs -I if flex_bg on

tune2fs: don't resize inode if flex_bg is on.

misc/tune2fs.c +7 -0
index 8bb6fd2..453a529 100644
@@ -1604,6 +1604,13 @@ retry_open:
 				"unmounted.\n"), stderr);
 			exit(1);
 		}
+		if (fs->super->s_feature_incompat &
+		    EXT4_FEATURE_INCOMPAT_FLEX_BG) {
+			fputs(_("Filesystem has flex_bg feature. Resizing "
+				"inode will mess up inode table. Abort.\n"),
+				stderr);
+			exit(1);
+		}
 		/*
 		 * We want to update group descriptor also
 		 * with the new free inode count