From: Andreas Dilger <adilger@sun.com>
To: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: Pavel Emelyanov <xemul@openvz.org>,
"Theodore Ts'o" <tytso@mit.edu>,
ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] A request to reserve a "tree id" field on ext[34] inodes
Date: Wed, 18 Nov 2009 22:33:52 -0800 [thread overview]
Message-ID: <BC3BF6F1-81BA-49A3-98BA-46A0F87D4A3D@sun.com> (raw)
In-Reply-To: <87skcb20ge.fsf@openvz.org>
On 2009-11-18, at 09:43, Dmitry Monakhov wrote:
> In other point of view it may be too expensive reserve the last 4
> bytes in EXT4_GOOD_OLD_INODE. At the same time store tree_id as xattr.
> result in space wasting.
Since the xattr is stored inside the inode, and you are accessing this
from the kernel, it is using only 24 bytes of space used for your tree
ID (20 bytes ext4_xattr_entry, including 3-byte name, 4 bytes data).
It also has virtually no performance overhead because it is kept in
the inode itself.
If you consider that the use of tree_id is not likely to be commonly
used, then it would be "wasting" 4 bytes of space in everyone else's
inodes to reserve this field in the inode (whether in the old inode or
the larger ext4 inode).
> But in fact new inode has room for space
> reservation. We may store it like it is done for i_version_hi field
> --- a/fs/ext4/ext4.h
> +++ b/fs/ext4/ext4.h
> @@ -494,6 +494,7 @@ struct ext4_inode {
> __le32 i_crtime; /* File Creation time */
> __le32 i_crtime_extra; /* extra FileCreationtime (nsec << 2 |
> epoch) */
> __le32 i_version_hi; /* high 32 bits for 64-bit version */
> + __le32 i_disk_tree_id; /* directory tree quota id */
> };
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
next prev parent reply other threads:[~2009-11-19 6:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-17 14:04 [PATCH] A request to reserve a "tree id" field on ext[34] inodes Pavel Emelyanov
2009-11-17 17:06 ` Andreas Dilger
2009-11-17 21:19 ` Dmitry Monakhov
2009-11-18 17:43 ` Dmitry Monakhov
2009-11-19 6:33 ` Andreas Dilger [this message]
2009-11-17 17:12 ` Jan Kara
2009-11-17 17:55 ` Pavel Emelyanov
2009-11-17 18:47 ` Jan Kara
2009-11-17 21:19 ` Dmitry Monakhov
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=BC3BF6F1-81BA-49A3-98BA-46A0F87D4A3D@sun.com \
--to=adilger@sun.com \
--cc=dmonakhov@openvz.org \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=xemul@openvz.org \
/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