From patchwork Wed Dec 7 00:13:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Dilger X-Patchwork-Id: 129858 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 0193E1007D6 for ; Wed, 7 Dec 2011 11:13:58 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751672Ab1LGAN4 (ORCPT ); Tue, 6 Dec 2011 19:13:56 -0500 Received: from mail-yx0-f174.google.com ([209.85.213.174]:52685 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751320Ab1LGAN4 (ORCPT ); Tue, 6 Dec 2011 19:13:56 -0500 Received: by yenm1 with SMTP id m1so3530015yen.19 for ; Tue, 06 Dec 2011 16:13:56 -0800 (PST) Received: by 10.236.139.199 with SMTP id c47mr22988393yhj.113.1323216836094; Tue, 06 Dec 2011 16:13:56 -0800 (PST) Received: from cabot-wlan.adilger.int (S0106002191d9348c.cg.shawcable.net. [68.147.208.101]) by mx.google.com with ESMTPS id c10sm40113910yhj.2.2011.12.06.16.13.54 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 06 Dec 2011 16:13:55 -0800 (PST) Subject: [PATCH 01/02] ext2: reserve INCOMPAT_INLINEDATA feature flag Mime-Version: 1.0 (Apple Message framework v1084) From: Andreas Dilger In-Reply-To: Date: Tue, 6 Dec 2011 17:13:51 -0700 Cc: Theodore Ts'o , ext4 development , Liang Zhen , Tao Ma Message-Id: References: To: Andreas Dilger X-Mailer: Apple Mail (2.1084) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Reserve the EXT4_FEATURE_INCOMPAT_INLINEDATA feature flag for use with storing small file data in the i_blocks field (up to 60 bytes) and/or the large xattr space (after i_extra_isize, up to the large inode size). On typical filesystems this can save 1-3% of the space, and more importantly it also avoids seeking to read the data block. This will become increasingly important with bigalloc filesystems, since they consume a full cluster of blocks for each file, including small directories that could easily fit into the inode itself. Signed-off-by: Andreas Dilger Originally-by: Tao Ma --- lib/ext2fs/ext2_fs.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/ext2fs/ext2_fs.h b/lib/ext2fs/ext2_fs.h index 0f8cde8..6cf47f9 100644 --- a/lib/ext2fs/ext2_fs.h +++ b/lib/ext2fs/ext2_fs.h @@ -719,6 +719,7 @@ struct ext2_super_block { #define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200 #define EXT4_FEATURE_INCOMPAT_EA_INODE 0x0400 #define EXT4_FEATURE_INCOMPAT_DIRDATA 0x1000 +#define EXT4_FEATURE_INCOMPAT_INLINEDATA 0x2000 /* data in inode */ #define EXT2_FEATURE_COMPAT_SUPP 0 #define EXT2_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE| \