diff mbox

[01/35,v3] libext2fs: add EXT4_FEATURE_INCOMPAT_INLINE_DATA flag

Message ID 1341150538-32047-2-git-send-email-wenqing.lz@taobao.com
State Superseded, archived
Headers show

Commit Message

Zheng Liu July 1, 2012, 1:48 p.m. UTC
From: Zheng Liu <wenqing.lz@taobao.com>

Add EXT4_FEATURE_INCOMPAT_INLINE_DATA flag to support inline
data feature.

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
---
 lib/e2p/feature.c    |    2 +-
 lib/ext2fs/ext2_fs.h |    2 +-
 lib/ext2fs/ext2fs.h  |    6 ++++--
 3 files changed, 6 insertions(+), 4 deletions(-)

Comments

Theodore Ts'o Aug. 7, 2012, 6:22 p.m. UTC | #1
On Sun, Jul 01, 2012 at 09:48:24PM +0800, Zheng Liu wrote:
> From: Zheng Liu <wenqing.lz@taobao.com>
> 
> Add EXT4_FEATURE_INCOMPAT_INLINE_DATA flag to support inline
> data feature.
> 
> Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>

I've pulled in the part of this patch which renames
INCOMPAT_INLINEDATA to INCOMPAT_INLINE_DATA to the next branch.

As far as actually adding this feature to
EXT2_LIB_FEATURE_INCOMPAT_SUPP, I have two comments.  In general, it's
best to add this to the patch series at the very end, so that if
someone is bisecting e2fsprogs, there's no chance that they end up
with the feature only partially supported.

If the development of the patch is going to take a long time, what I
have done in the past is to add the feature to
EXT2_LIB_SOFTSUPP_INCOMPAT and EXt2_LIB_SOFTSUPP_RO_COMPAT.  This
allows dumpe2fs and debugfs to recognize the file system, which is
handy for debugging and development.  But it doesn't allow e2fsck to
try to check or repair file systems with the feature enabled, since
usually e2fsck support is one of the last things to be coded up.

Then when we're ready to turn on the feature and fully support things,
we'll have a patch which adds the feature to
EXT2_LIB_FEATURE_INCOMPAT_SUPP, and remove it from the SOFTSUPP mask.

				    	      - Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Theodore Ts'o Aug. 7, 2012, 6:25 p.m. UTC | #2
On Tue, Aug 07, 2012 at 02:22:14PM -0400, Theodore Ts'o wrote:
> On Sun, Jul 01, 2012 at 09:48:24PM +0800, Zheng Liu wrote:
> > From: Zheng Liu <wenqing.lz@taobao.com>
> > 
> > Add EXT4_FEATURE_INCOMPAT_INLINE_DATA flag to support inline
> > data feature.
> > 
> > Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
> 
> I've pulled in the part of this patch which renames
> INCOMPAT_INLINEDATA to INCOMPAT_INLINE_DATA to the next branch....

Oops, I replied to the wrong patch.  This message should have been
attached to the mail thread for the v4 patch series.  Sorry about
that...

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Zheng Liu Aug. 13, 2012, 7:44 a.m. UTC | #3
On Tue, Aug 07, 2012 at 02:22:14PM -0400, Theodore Ts'o wrote:
> On Sun, Jul 01, 2012 at 09:48:24PM +0800, Zheng Liu wrote:
> > From: Zheng Liu <wenqing.lz@taobao.com>
> > 
> > Add EXT4_FEATURE_INCOMPAT_INLINE_DATA flag to support inline
> > data feature.
> > 
> > Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
> 
> I've pulled in the part of this patch which renames
> INCOMPAT_INLINEDATA to INCOMPAT_INLINE_DATA to the next branch.
> 
> As far as actually adding this feature to
> EXT2_LIB_FEATURE_INCOMPAT_SUPP, I have two comments.  In general, it's
> best to add this to the patch series at the very end, so that if
> someone is bisecting e2fsprogs, there's no chance that they end up
> with the feature only partially supported.
> 
> If the development of the patch is going to take a long time, what I
> have done in the past is to add the feature to
> EXT2_LIB_SOFTSUPP_INCOMPAT and EXt2_LIB_SOFTSUPP_RO_COMPAT.  This
> allows dumpe2fs and debugfs to recognize the file system, which is
> handy for debugging and development.  But it doesn't allow e2fsck to
> try to check or repair file systems with the feature enabled, since
> usually e2fsck support is one of the last things to be coded up.
> 
> Then when we're ready to turn on the feature and fully support things,
> we'll have a patch which adds the feature to
> EXT2_LIB_FEATURE_INCOMPAT_SUPP, and remove it from the SOFTSUPP mask.

Thanks for teaching me. :-)

Regards,
Zheng
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/lib/e2p/feature.c b/lib/e2p/feature.c
index 8ac4f3f..70815ef 100644
--- a/lib/e2p/feature.c
+++ b/lib/e2p/feature.c
@@ -93,7 +93,7 @@  static struct feature feature_list[] = {
 			"dirdata"},
 	{       E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_LARGEDIR,
 			"large_dir"},
-	{       E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_INLINEDATA,
+	{       E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_INLINE_DATA,
 			"inline_data"},
 	{	0, 0, 0 },
 };
diff --git a/lib/ext2fs/ext2_fs.h b/lib/ext2fs/ext2_fs.h
index 4093d5b..c6de26a 100644
--- a/lib/ext2fs/ext2_fs.h
+++ b/lib/ext2fs/ext2_fs.h
@@ -750,7 +750,7 @@  struct ext2_super_block {
 #define EXT4_FEATURE_INCOMPAT_DIRDATA		0x1000
 /* 0x2000 was EXT4_FEATURE_INCOMPAT_BG_USE_META_CSUM but this was never used */
 #define EXT4_FEATURE_INCOMPAT_LARGEDIR		0x4000 /* >2GB or 3-lvl htree */
-#define EXT4_FEATURE_INCOMPAT_INLINEDATA	0x8000 /* data in inode */
+#define EXT4_FEATURE_INCOMPAT_INLINE_DATA	0x8000 /* data in inode */
 
 #define EXT2_FEATURE_COMPAT_SUPP	0
 #define EXT2_FEATURE_INCOMPAT_SUPP    (EXT2_FEATURE_INCOMPAT_FILETYPE| \
diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
index 02e1b4e..65d30de 100644
--- a/lib/ext2fs/ext2fs.h
+++ b/lib/ext2fs/ext2fs.h
@@ -566,7 +566,8 @@  typedef struct ext2_icount *ext2_icount_t;
 					 EXT3_FEATURE_INCOMPAT_EXTENTS|\
 					 EXT4_FEATURE_INCOMPAT_FLEX_BG|\
 					 EXT4_FEATURE_INCOMPAT_MMP|\
-					 EXT4_FEATURE_INCOMPAT_64BIT)
+					 EXT4_FEATURE_INCOMPAT_64BIT|\
+					 EXT4_FEATURE_INCOMPAT_INLINE_DATA)
 #else
 #define EXT2_LIB_FEATURE_INCOMPAT_SUPP	(EXT2_FEATURE_INCOMPAT_FILETYPE|\
 					 EXT3_FEATURE_INCOMPAT_JOURNAL_DEV|\
@@ -575,7 +576,8 @@  typedef struct ext2_icount *ext2_icount_t;
 					 EXT3_FEATURE_INCOMPAT_EXTENTS|\
 					 EXT4_FEATURE_INCOMPAT_FLEX_BG|\
 					 EXT4_FEATURE_INCOMPAT_MMP|\
-					 EXT4_FEATURE_INCOMPAT_64BIT)
+					 EXT4_FEATURE_INCOMPAT_64BIT|\
+					 EXT4_FEATURE_INCOMPAT_INLINE_DATA)
 #endif
 #ifdef CONFIG_QUOTA
 #define EXT2_LIB_FEATURE_RO_COMPAT_SUPP	(EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER|\