From patchwork Fri Sep 14 11:25:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tao Ma X-Patchwork-Id: 183904 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 86AFD2C0086 for ; Fri, 14 Sep 2012 21:34:44 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756175Ab2INLeY (ORCPT ); Fri, 14 Sep 2012 07:34:24 -0400 Received: from oproxy7-pub.bluehost.com ([67.222.55.9]:55607 "HELO oproxy7-pub.bluehost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753367Ab2INLeJ (ORCPT ); Fri, 14 Sep 2012 07:34:09 -0400 Received: (qmail 26396 invoked by uid 0); 14 Sep 2012 11:34:09 -0000 Received: from unknown (HELO box585.bluehost.com) (66.147.242.185) by oproxy7.bluehost.com with SMTP; 14 Sep 2012 11:34:09 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tao.ma; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:To:From; bh=O3yKZLEjQTf7Qif84W3gHn4jXRNhKnJxWMsiG3SGgIE=; b=iDn/WK1VLBLY4bNiasAUFVQhClwksLpjhnYtqFpEzSwbaCHUnLs+O8EVkCZD/NBKFST8ZeOi1MlkieMycn6OXsJJqi+AvJim1X0Mj49N9i+ObMMUHRTQF6WCLR7U0j07; Received: from [182.92.247.2] (port=60014 helo=tma-laptop1.taobao.ali.com) by box585.bluehost.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1TCU1m-0001sO-GU for linux-ext4@vger.kernel.org; Fri, 14 Sep 2012 05:25:42 -0600 From: Tao Ma To: linux-ext4@vger.kernel.org Subject: [PATCH V6 23/23] ext4: Enable ext4 inline support. Date: Fri, 14 Sep 2012 19:25:11 +0800 Message-Id: <1347621911-4104-23-git-send-email-tm@tao.ma> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1347621911-4104-1-git-send-email-tm@tao.ma> References: <1347621512-3660-1-git-send-email-tm@tao.ma> <1347621911-4104-1-git-send-email-tm@tao.ma> X-Identified-User: {1390:box585.bluehost.com:colyli:tao.ma} {sentby:smtp auth 182.92.247.2 authed with tm@tao.ma} Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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 1ffe00a..1ec9f5f 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -1497,7 +1497,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_INLINE_DATA) #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 26154b8..e9dc036 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -896,6 +896,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_INLINE_DATA)) + ext4_set_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA); + ret = inode; dquot_initialize(inode); err = dquot_alloc_inode(inode);