From: Tao Ma Subject: [PATCH V5 23/23] ext4: Enable ext4 inline support. Date: Sat, 30 Jun 2012 23:45:24 +0800 Message-ID: <1341071124-4976-23-git-send-email-tm@tao.ma> References: <1341070917-4889-1-git-send-email-tm@tao.ma> <1341071124-4976-1-git-send-email-tm@tao.ma> To: linux-ext4@vger.kernel.org Return-path: Received: from oproxy1-pub.bluehost.com ([66.147.249.253]:46628 "HELO oproxy1-pub.bluehost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755623Ab2F3Pt5 (ORCPT ); Sat, 30 Jun 2012 11:49:57 -0400 Received: from [221.217.40.18] (port=40170 helo=localhost.localdomain) by box585.bluehost.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1SkzuX-0006eg-My for linux-ext4@vger.kernel.org; Sat, 30 Jun 2012 09:48:38 -0600 In-Reply-To: <1341071124-4976-1-git-send-email-tm@tao.ma> Sender: linux-ext4-owner@vger.kernel.org List-ID: From: Tao Ma Signed-off-by: Tao Ma --- fs/ext4/ext4.h | 3 ++- fs/ext4/ialloc.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 953f530..5abe31f 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -1494,7 +1494,8 @@ static inline void ext4_clear_state_flags(struct ext4_inode_info *ei) EXT4_FEATURE_INCOMPAT_EXTENTS| \ EXT4_FEATURE_INCOMPAT_64BIT| \ EXT4_FEATURE_INCOMPAT_FLEX_BG| \ - EXT4_FEATURE_INCOMPAT_MMP) + EXT4_FEATURE_INCOMPAT_MMP | \ + EXT4_FEATURE_INCOMPAT_INLINEDATA) #define EXT4_FEATURE_RO_COMPAT_SUPP (EXT4_FEATURE_RO_COMPAT_SPARSE_SUPER| \ EXT4_FEATURE_RO_COMPAT_LARGE_FILE| \ EXT4_FEATURE_RO_COMPAT_GDT_CSUM| \ diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index d48e8b1..25ff883 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -898,6 +898,10 @@ got: ei->i_extra_isize = EXT4_SB(sb)->s_want_extra_isize; + ei->i_inline_off = 0; + if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_INLINEDATA)) + ext4_set_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA); + ret = inode; dquot_initialize(inode); err = dquot_alloc_inode(inode); -- 1.7.0.4