linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tao Ma <tm@tao.ma>
To: Ted Ts'o <tytso@mit.edu>,
	ext4 development <linux-ext4@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Andreas Dilger <adilger@d
Subject: [PATCH V2 00/19] ext4: Add inline data support.
Date: Tue, 22 Nov 2011 00:34:59 +0800	[thread overview]
Message-ID: <4ECA7DB3.9040605@tao.ma> (raw)

Hi Ted, Andreas and list,
	This is the v2 attempt to add inline data support to ext4 inode.
Formore information about the background, please refer to the thread
http://marc.info/?l=linux-ext4&m=131715205428067&w=2

In V1 I uses all the space between i_extra_isize and inode_size if
inode_size = 256. For inode_size > 256, half of that space is used so as
to leave some space for other xattrs. Andreas suggested that it would
make xattr set/get less efficient since it takes too much space for a
small inode and xttr would be evicted to the external block. So this V2
now uses the extent space for an inode(60 bytes) at first and then it
will try to extend inline data by using the xattr space. So if there are
no other xattr, now we can have up to 132 bytes to store the inline data
for a inode_size=256. And also as Amir suggested, I have moved all the
corresponding codes to fs/ext4/inline.c so that we don't pollute inode.c
too much.

Some simple tests shows that with a linux-3.0 vanilla source, the new
dir can save more than 1% disk space. For my "/usr", it can save more
than 3% spaces. I guess for volume with future bigalloc support, it
should save more space for us for small dir.

There are still something to do in my list:
1. yes, e2fsprogs is very important and we are working on it.
2. evicting inline data in xattr set if the xattr can be inserted into
inode as suggested by Andreas.

any suggestions are welcomed.

git diff --stat master..
 fs/ext4/Makefile  |    2 +-
 fs/ext4/dir.c     |   36 +-
 fs/ext4/ext4.h    |   72 +++-
 fs/ext4/extents.c |    9 +-
 fs/ext4/ialloc.c  |    4 +
 fs/ext4/inline.c  | 1426
+++++++++++++++++++++++++++++++++++++++++++++++++++++
 fs/ext4/inode.c   |  209 ++++++--
 fs/ext4/namei.c   |  348 +++++++++----
 fs/ext4/xattr.c   |   39 +--
 fs/ext4/xattr.h   |  256 ++++++++++
 10 files changed, 2185 insertions(+), 216 deletions(-)

Thanks
Tao

             reply	other threads:[~2011-11-21 16:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-21 16:34 Tao Ma [this message]
2011-11-21 16:39 ` [PATCH V2 01/19] ext4: Move extra inode read to a new function Tao Ma
2011-11-21 16:39   ` [PATCH V2 02/19] ext4: export inline xattr functions Tao Ma
2011-11-21 16:39   ` [PATCH V2 03/19] ext4: Add the basic function for inline data support Tao Ma
2011-11-21 16:39   ` [PATCH V2 04/19] ext4: Add read support for inline data Tao Ma
2011-11-21 16:39   ` [PATCH V2 05/19] ext4: Add normal write " Tao Ma
2011-11-21 16:39   ` [PATCH V2 06/19] ext4: Add journalled " Tao Ma
2011-11-21 16:39   ` [PATCH V2 07/19] ext4: Add delalloc " Tao Ma
2011-11-21 16:39   ` [PATCH V2 08/19] ext4: Create a new function ext4_init_new_dir Tao Ma
2011-11-21 16:39   ` [PATCH V2 09/19] ext4: Refactor __ext4_check_dir_entry to accepts start and size Tao Ma
2011-11-21 16:39   ` [PATCH V2 10/19] ext4: Create __ext4_insert_dentry for dir entry insertion Tao Ma
2011-11-21 16:39   ` [PATCH V2 11/19] ext4: let add_dir_entry handle inline data properly Tao Ma
2011-11-21 16:39   ` [PATCH V2 12/19] ext4: Let ext4_readdir handle inline data Tao Ma
2011-11-21 16:39   ` [PATCH V2 13/19] ext4: Create a new function search_dir Tao Ma
2011-11-21 16:39   ` [PATCH V2 14/19] ext4: let ext4_find_entry handle inline data Tao Ma
2011-11-21 16:39   ` [PATCH V2 15/19] ext4: make ext4_delete_entry generic Tao Ma
2011-11-21 16:39   ` [PATCH V2 16/19] ext4: let ext4_delete_entry handle inline data Tao Ma
2011-11-21 16:39   ` [PATCH V2 17/19] ext4: let empty_dir handle inline dir Tao Ma
2011-11-21 16:39   ` [PATCH V2 18/19] ext4: let ext4_rename " Tao Ma
2011-11-21 16:39   ` [PATCH V2 19/19] ext4: Enable ext4 inline support Tao Ma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ECA7DB3.9040605@tao.ma \
    --to=tm@tao.ma \
    --cc=adilger@d \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).