Skip to contentSkip to conversation

ext3: remove btree_dir

PATCH In review Qi Yong 2 participants 2 messages Jul 13, 2006 ext2 file system

lore
Share & tools
lore

Qi Yong

author
#0 lore raw

PATCH 1/1 ext3: remove btree_dir

Remove support for EXT3_FEATURE_RO_COMPAT_BTREE_DIR, so mount can safely fail out when some new feature added using 0x0004.

---

include/linux/ext2_fs.h +1 -3
index facf34e..d63d2ec 100644
@@ -463,7 +463,6 @@ #define EXT2_FEATURE_COMPAT_ANY			0xffff
 
 #define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER	0x0001
 #define EXT2_FEATURE_RO_COMPAT_LARGE_FILE	0x0002
-#define EXT2_FEATURE_RO_COMPAT_BTREE_DIR	0x0004
 #define EXT2_FEATURE_RO_COMPAT_ANY		0xffffffff
 
 #define EXT2_FEATURE_INCOMPAT_COMPRESSION	0x0001
@@ -477,8 +476,7 @@ #define EXT2_FEATURE_COMPAT_SUPP	EXT2_FE
 #define EXT2_FEATURE_INCOMPAT_SUPP	(EXT2_FEATURE_INCOMPAT_FILETYPE| \
 					 EXT2_FEATURE_INCOMPAT_META_BG)
 #define EXT2_FEATURE_RO_COMPAT_SUPP	(EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
-					 EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
-					 EXT2_FEATURE_RO_COMPAT_BTREE_DIR)
+					 EXT2_FEATURE_RO_COMPAT_LARGE_FILE)
 #define EXT2_FEATURE_RO_COMPAT_UNSUPPORTED	~EXT2_FEATURE_RO_COMPAT_SUPP
 #define EXT2_FEATURE_INCOMPAT_UNSUPPORTED	~EXT2_FEATURE_INCOMPAT_SUPP
 
include/linux/ext3_fs.h +1 -3
index 5607e64..7974c44 100644
@@ -553,7 +553,6 @@ #define EXT3_FEATURE_COMPAT_DIR_INDEX		0
 
 #define EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER	0x0001
 #define EXT3_FEATURE_RO_COMPAT_LARGE_FILE	0x0002
-#define EXT3_FEATURE_RO_COMPAT_BTREE_DIR	0x0004
 
 #define EXT3_FEATURE_INCOMPAT_COMPRESSION	0x0001
 #define EXT3_FEATURE_INCOMPAT_FILETYPE		0x0002
@@ -566,8 +565,7 @@ #define EXT3_FEATURE_INCOMPAT_SUPP	(EXT3
 					 EXT3_FEATURE_INCOMPAT_RECOVER| \
 					 EXT3_FEATURE_INCOMPAT_META_BG)
 #define EXT3_FEATURE_RO_COMPAT_SUPP	(EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
-					 EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
-					 EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
+					 EXT3_FEATURE_RO_COMPAT_LARGE_FILE)
 
 /*
  * Default values for user and/or group using reserved blocks
Signature · 1 line
Qi Yong
#1 lore raw

Hi,

Quoted 2 lines · Qi Yong

Remove support for EXT3_FEATURE_RO_COMPAT_BTREE_DIR, so mount can safely fail out when some new feature added using 0x0004.

I think this is a bad idea.

It's not safe to reuse this existing feature bit: if we do, then any existing 2.6 kernel prior to the change will mistakenly think that it understands that feature for read-write, and will therefore be likely to corrupt data. And we are not remotely short of feature bits, so there's no pressure to free up existing bits.

Removing the flag from the tree will remove what is essentially documentation that this flag cannot be reused.

Cheers,
Stephen