diff mbox

[05/35,v3] libext2fs: add EXT4_INLINE_DATA_FL flag for inode

Message ID 1341150538-32047-6-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_INLINE_DATA_FL flag.

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
---
 lib/ext2fs/ext2_fs.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Theodore Ts'o July 16, 2012, 3:01 p.m. UTC | #1
On Sun, Jul 01, 2012 at 09:48:28PM +0800, Zheng Liu wrote:
> From: Zheng Liu <wenqing.lz@taobao.com>
> 
> Add EXT4_INLINE_DATA_FL flag.
> 
>  /* EXT4_EOFBLOCKS_FL 0x00400000 was here */
> +#define EXT4_INLINE_DATA_FL		0x00800000 /* Inode has inline data */

Hi,

Unfortunately, we have a codepoint collision.  The BTRFS folks have
already exposed FS_NOCOW_FL as 0x00800000; this is in mainline in the
kernel, and in fact that latest version of e2fsprogs understands this
since lsattr and chattr are used by multiple file systems (even though
it was originally intended only for ext2/3/4).

I'd like to move this to:

#define EXT4_INLINE_DATA_FL	0x10000000 /* Inode has inline data */

However, if you already have this in production internally inside
Taobao, this could potentially could be a problem for you.  (We've had
to handle this before inside Google, when we used a different code
point for EOFBLOCKS_FL than what ended up being used in mainline; it
can be dealt with, but it's certainly annoying...)

Is this going to potentially be a problem for you?

Regards,

						- 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 July 17, 2012, 2:20 a.m. UTC | #2
On Mon, Jul 16, 2012 at 11:01:44AM -0400, Theodore Ts'o wrote:
> On Sun, Jul 01, 2012 at 09:48:28PM +0800, Zheng Liu wrote:
> > From: Zheng Liu <wenqing.lz@taobao.com>
> > 
> > Add EXT4_INLINE_DATA_FL flag.
> > 
> >  /* EXT4_EOFBLOCKS_FL 0x00400000 was here */
> > +#define EXT4_INLINE_DATA_FL		0x00800000 /* Inode has inline data */
> 
> Hi,
> 
> Unfortunately, we have a codepoint collision.  The BTRFS folks have
> already exposed FS_NOCOW_FL as 0x00800000; this is in mainline in the
> kernel, and in fact that latest version of e2fsprogs understands this
> since lsattr and chattr are used by multiple file systems (even though
> it was originally intended only for ext2/3/4).
> 
> I'd like to move this to:
> 
> #define EXT4_INLINE_DATA_FL	0x10000000 /* Inode has inline data */
> 
> However, if you already have this in production internally inside
> Taobao, this could potentially could be a problem for you.  (We've had
> to handle this before inside Google, when we used a different code
> point for EOFBLOCKS_FL than what ended up being used in mainline; it
> can be dealt with, but it's certainly annoying...)
> 
> Is this going to potentially be a problem for you?

Hi Ted,

I have discussed this issue with Tao, and it is not a problem for us.
So we could change it to '0x10000000'. :)

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/ext2fs/ext2_fs.h b/lib/ext2fs/ext2_fs.h
index c6de26a..aa3e808 100644
--- a/lib/ext2fs/ext2_fs.h
+++ b/lib/ext2fs/ext2_fs.h
@@ -315,6 +315,7 @@  struct ext2_dx_tail {
 #define EXT4_EXTENTS_FL 		0x00080000 /* Inode uses extents */
 #define EXT4_EA_INODE_FL	        0x00200000 /* Inode used for large EA */
 /* EXT4_EOFBLOCKS_FL 0x00400000 was here */
+#define EXT4_INLINE_DATA_FL		0x00800000 /* Inode has inline data */
 #define EXT4_SNAPFILE_FL		0x01000000  /* Inode is a snapshot */
 #define EXT4_SNAPFILE_DELETED_FL	0x04000000  /* Snapshot is being deleted */
 #define EXT4_SNAPFILE_SHRUNK_FL		0x08000000  /* Snapshot shrink has completed */