From patchwork Tue Jul 31 11:47:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheng Liu X-Patchwork-Id: 174223 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 54FC52C007C for ; Tue, 31 Jul 2012 21:40:00 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756011Ab2GaLj7 (ORCPT ); Tue, 31 Jul 2012 07:39:59 -0400 Received: from mail-yx0-f174.google.com ([209.85.213.174]:42093 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755715Ab2GaLj6 (ORCPT ); Tue, 31 Jul 2012 07:39:58 -0400 Received: by yenl2 with SMTP id l2so5911698yen.19 for ; Tue, 31 Jul 2012 04:39:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=tJLDcrjTDA1mGVYqXFZgRdbV8OZB2yHUB0XrkYDr4S4=; b=CfeqEdAvXz0eCO+PujkkXJ7WJ8xt2iimkzjdfnFuJrm+TtwkNhl2pk9pjx+++tcENT jRqs4NCT15G5sqcOBumAfuN/aWN2QCnyKM2nLqBys00e4C709j9AIu46oKvJxyi7Jbmb l+xSnChX8pQR+6F7I4biM0FFYZCKtdRueqbqogVgiMXAoX0KoeY4oSG64c1hkSHaTJJK 4mnN1m4fUg3UBbbpvpkPt6vqznwOnCEfJPPM7KIXPxZEwWAVQWSzAbvQycJtLgZMWfin rsK35HU6n91KBtLYXhf5CBWwOAn9aRQ3bHe9Fxw+gks6N/ALtsJdshDB6mvh85BNfsl+ 3IoQ== Received: by 10.66.76.196 with SMTP id m4mr31754851paw.61.1343734798016; Tue, 31 Jul 2012 04:39:58 -0700 (PDT) Received: from localhost.localdomain ([182.92.247.2]) by mx.google.com with ESMTPS id oo6sm135950pbc.22.2012.07.31.04.39.56 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 Jul 2012 04:39:57 -0700 (PDT) From: Zheng Liu To: linux-ext4@vger.kernel.org Cc: Zheng Liu Subject: [PATCH 06/36 v4] libext2fs: add data structures for inline data feature Date: Tue, 31 Jul 2012 19:47:59 +0800 Message-Id: <1343735309-30579-7-git-send-email-wenqing.lz@taobao.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1343735309-30579-1-git-send-email-wenqing.lz@taobao.com> References: <1343735309-30579-1-git-send-email-wenqing.lz@taobao.com> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Zheng Liu Add ext2_ext_attr_ibody_heaer to check extend attribute. Add inline_data to indicate the position of inline data in extend attribute and the size of inline data. Signed-off-by: Zheng Liu --- lib/ext2fs/ext2_ext_attr.h | 4 ++++ lib/ext2fs/ext2_fs.h | 7 +++++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/lib/ext2fs/ext2_ext_attr.h b/lib/ext2fs/ext2_ext_attr.h index bbb0aaa..5c7c715 100644 --- a/lib/ext2fs/ext2_ext_attr.h +++ b/lib/ext2fs/ext2_ext_attr.h @@ -25,6 +25,10 @@ struct ext2_ext_attr_header { __u32 h_reserved[3]; /* zero right now */ }; +struct ext2_ext_attr_ibody_header { + __u32 h_magic; +}; + struct ext2_ext_attr_entry { __u8 e_name_len; /* length of name */ __u8 e_name_index; /* attribute name index */ diff --git a/lib/ext2fs/ext2_fs.h b/lib/ext2fs/ext2_fs.h index aa3e808..7e05183 100644 --- a/lib/ext2fs/ext2_fs.h +++ b/lib/ext2fs/ext2_fs.h @@ -904,4 +904,11 @@ struct mmp_struct { */ #define EXT4_MMP_MIN_CHECK_INTERVAL 5 +struct inline_data { + __u16 inline_off; + __u16 inline_size; +}; + +#define EXT4_MIN_INLINE_DATA_SIZE ((sizeof(__u32) * EXT2_N_BLOCKS)) + #endif /* _LINUX_EXT2_FS_H */