From patchwork Sun Jul 1 13:48:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheng Liu X-Patchwork-Id: 168402 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 892282C01C0 for ; Sun, 1 Jul 2012 23:41:03 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932402Ab2GANlB (ORCPT ); Sun, 1 Jul 2012 09:41:01 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:36672 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932398Ab2GANlB (ORCPT ); Sun, 1 Jul 2012 09:41:01 -0400 Received: by mail-pz0-f46.google.com with SMTP id y13so6319540dad.19 for ; Sun, 01 Jul 2012 06:41:00 -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=8FybiHkfhd2qia8kINFNUVf0M9mttpvf2qpeeQ24J4o=; b=0d2WnKDjTgqwuIc8U63cTVYkShu6iFhCScJvtOmvO1kw513n6bo8NMCJh3Uqcq6AOq b/zeFbM3A1YrIv8aDW+q0iDZimt9coXBxMSCZRX8gyCHxpwzxaPJfXzNhNgs09YM+Qe1 /OqdFcLJ4+LkNdFgUGZSi9d+AD9EevLTx87dsszCSM87rx910DYcWR7Lp1rLSzXp0BEl LrYOef9jbgospna5vZp4NZdnKU7zXsA03s3DivTaefLII6BNYavyEhMJd9Yw41S1ycmh lXy4mzi11R9HmSaKQk9iMBWpMzUWPWcba+u9IDvh7af25lQPfU2aTfYo2kbNvJ1uY4w0 5hbA== Received: by 10.68.220.39 with SMTP id pt7mr22454770pbc.40.1341150060824; Sun, 01 Jul 2012 06:41:00 -0700 (PDT) Received: from localhost.localdomain ([182.92.247.2]) by mx.google.com with ESMTPS id ql3sm10544254pbc.72.2012.07.01.06.40.59 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 01 Jul 2012 06:41:00 -0700 (PDT) From: Zheng Liu To: linux-ext4@vger.kernel.org Cc: Zheng Liu Subject: [PATCH 06/35 v3] libext2fs: add data structures for inline data feature Date: Sun, 1 Jul 2012 21:48:29 +0800 Message-Id: <1341150538-32047-7-git-send-email-wenqing.lz@taobao.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1341150538-32047-1-git-send-email-wenqing.lz@taobao.com> References: <1341150538-32047-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 */