From patchwork Mon Apr 16 11:39:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheng Liu X-Patchwork-Id: 152791 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 312E5B7020 for ; Mon, 16 Apr 2012 21:34:07 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753116Ab2DPLeE (ORCPT ); Mon, 16 Apr 2012 07:34:04 -0400 Received: from mail-pz0-f52.google.com ([209.85.210.52]:62902 "EHLO mail-pz0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753145Ab2DPLeE (ORCPT ); Mon, 16 Apr 2012 07:34:04 -0400 Received: by mail-pz0-f52.google.com with SMTP id e40so6801134dak.11 for ; Mon, 16 Apr 2012 04:34:04 -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=MAaZw/oZhU7upAf/b/og8MWQKJ3FP6glIwLC/94YmDc=; b=q6hgVtmdpHNYbBS1yf5fDvO5o20wOPXCkfmWuAbjrdEBDaMmAjKs0fx2XR+Qm5tFFJ zlyTrZCyy9CVrUpIIaj4DRjaSiRTsLT+e0raMGqcRq3g0CH5ZTHFB9RhEPRokHcm9cPv Hn3dlZZp1bUOTgBiHn0AV13qo2M11SyWa0NJb00McB/qpLRA/5mkV2LMXLEnOJ0A1YHg steV5T/AvmELlsUCcfI+xqKtYU101Xcc/0jSvgFjpBZNOEg8+tLWOdiIavSHj0VBXYMe Fg5tPem1ioFNkUlvQU130WbZC3mI6RHkDd8B4+YE6Z8kLFdSatK5I6MPX5jRY/Os6Qsg rZQg== Received: by 10.68.231.2 with SMTP id tc2mr10438604pbc.164.1334576044037; Mon, 16 Apr 2012 04:34:04 -0700 (PDT) Received: from localhost.localdomain ([182.92.247.2]) by mx.google.com with ESMTPS id l6sm17474160pbp.33.2012.04.16.04.34.02 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 16 Apr 2012 04:34:03 -0700 (PDT) From: Zheng Liu To: linux-ext4@vger.kernel.org Cc: Zheng Liu Subject: [PATCH 07/32] libext2fs: add data structures for inline data feature Date: Mon, 16 Apr 2012 19:39:42 +0800 Message-Id: <1334576407-4007-8-git-send-email-wenqing.lz@taobao.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1334576407-4007-1-git-send-email-wenqing.lz@taobao.com> References: <1334576407-4007-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 ed548d1..78ef7fc 100644 --- a/lib/ext2fs/ext2_ext_attr.h +++ b/lib/ext2fs/ext2_ext_attr.h @@ -23,6 +23,10 @@ struct ext2_ext_attr_header { __u32 h_reserved[4]; /* 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 0f0239b..4a275d9 100644 --- a/lib/ext2fs/ext2_fs.h +++ b/lib/ext2fs/ext2_fs.h @@ -855,4 +855,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 */