From: Yu Jian <yujian@whamcloud.com>
To: tytso@mit.edu
Cc: Andreas Dilger <adilger@whamcloud.com>,
"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
Yu Jian <yujian@whamcloud.com>
Subject: Increase xattr space by allocating contiguous xattr blocks
Date: Mon, 21 Nov 2011 20:22:26 +0800 [thread overview]
Message-ID: <4ECA4282.5020908@whamcloud.com> (raw)
In-Reply-To: <246EA1CC-3C33-4D41-80C0-2331C426EBB0@whamcloud.com>
Hello Ted,
I'm working on the patches for large xattrs support again based on the
previous patch made by Kalpak Shah. There are some small issues in the
previous patch, I'd fix them and rebase the patch on the latest ext4 codes.
Per the thread of
http://kerneltrap.org/mailarchive/linux-ext4/2009/2/9/4931244, there are
two features need to be implemented:
1) store large xattr value (with value_size > blocksize) in an external
xattr inode
2) increase xattr space by allocating a single chunk of up to 64kB (in
size) contiguous xattr blocks
The first one has been implemented in the previous patch, and I'm
working on the second one, which would handle "medium-sized" xattrs more
efficiently.
Now, I've the same question as that in the above thread:
In xattr.{h,c}, all of the macros and functions assume the xattr space
is contiguous with entries growing downwards and values growing upwards
(aligned to the end of the space). Especially, the create, replace,
remove and shift operations of xattrs are all performed inside a
contiguous buffer. This is no problem with in-inode xattr space and
single external xattr block which is associated with one block buffer.
But for multiple xattr blocks, since the data of them would be read into
different block buffers, which are not contiguous, most of the existing
macros and functions need to be changed. Is this way acceptable?
In order to make most of the codes remain as-is, we could allocate a
contiguous large buffer (up to 64kB in size) to handle all of the data.
However, we have to memcpy the data from block buffers to the large
buffer, and after the data are changed, we need memcpy the data back to
block buffers to make the data written into the block device. Is this
way reasonable?
Could you please give me some suggestions on how to solve this issue?
Thanks!
--
Best regards,
Yu Jian
next prev parent reply other threads:[~2011-11-21 12:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4EC10664.1080501@tuxadero.com>
[not found] ` <CAO47_-9nfO32nwOAQMVdqw6iWGWK+FWb+MD=WeOz_vr4YrrKmw@mail.gmail.com>
2011-11-15 14:22 ` ceph and ext4 Ted Ts'o
2011-11-15 16:43 ` Andreas Dilger
2011-11-15 18:43 ` Yehuda Sadeh Weinraub
2011-11-21 12:22 ` Yu Jian [this message]
2011-11-21 15:08 ` Increase xattr space by allocating contiguous xattr blocks Theodore Tso
2011-11-22 3:32 ` Yu Jian
2011-11-22 4:53 ` Eric Sandeen
2011-11-23 17:09 ` [PATCH] xfstests: Sort recursive getfattr output in 062 Eric Sandeen
2011-11-28 11:03 ` Christoph Hellwig
2012-01-25 21:38 ` [PATCH V2] " Eric Sandeen
2012-01-27 10:53 ` Christoph Hellwig
2011-12-08 22:59 ` ceph and ext4 Christian Brunner
2011-12-09 22:24 ` Andreas Dilger
2012-02-12 4:05 ` Yehuda Sadeh Weinraub
2012-02-12 17:18 ` Andreas Dilger
2012-02-12 19:50 ` Yehuda Sadeh Weinraub
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=4ECA4282.5020908@whamcloud.com \
--to=yujian@whamcloud.com \
--cc=adilger@whamcloud.com \
--cc=linux-ext4@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).