* [PATCH][e2fsprogs]tune2fs: refuse to unmark flex_bg via clear_ok_features
@ 2008-11-21 13:36 Peng Tao
0 siblings, 0 replies; only message in thread
From: Peng Tao @ 2008-11-21 13:36 UTC (permalink / raw)
To: ext4 development
[-- Attachment #1: Type: text/plain, Size: 1377 bytes --]
IIUC, clear_ok_features is the gateway for all features that can be
cleared by tune2fs. So refuse to unmark flex_bg via clear_ok_features
instead of dealing with it alone. Having flex_bg in clear_ok_features is
quite misleading.
Signed-off-by: Peng Tao <bergwolf@gmail.com>
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index e72518a..c1876d1 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -136,8 +136,7 @@ static __u32 clear_ok_features[3] = {
EXT2_FEATURE_COMPAT_RESIZE_INODE |
EXT2_FEATURE_COMPAT_DIR_INDEX,
/* Incompat */
- EXT2_FEATURE_INCOMPAT_FILETYPE |
- EXT4_FEATURE_INCOMPAT_FLEX_BG,
+ EXT2_FEATURE_INCOMPAT_FILETYPE,
/* R/O compat */
EXT2_FEATURE_RO_COMPAT_LARGE_FILE |
EXT4_FEATURE_RO_COMPAT_HUGE_FILE|
@@ -407,15 +406,6 @@ static void update_feature_set(ext2_filsys fs, char
*features)
uuid_generate((unsigned char *) sb->s_hash_seed);
}
- if (FEATURE_OFF(E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_FLEX_BG)) {
- if (ext2fs_check_desc(fs)) {
- fputs(_("Clearing the flex_bg flag would "
- "cause the the filesystem to be\n"
- "inconsistent.\n"), stderr);
- exit(1);
- }
- }
-
if (FEATURE_OFF(E2P_FEATURE_RO_INCOMPAT,
EXT4_FEATURE_RO_COMPAT_HUGE_FILE)) {
if ((mount_flags & EXT2_MF_MOUNTED) &&
--
Cheers,
Bergwolf
Here lieth one whose name was writ on water.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-11-21 13:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-21 13:36 [PATCH][e2fsprogs]tune2fs: refuse to unmark flex_bg via clear_ok_features Peng Tao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).