From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
To: "linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
Theodore Ts'o <tytso@mit.edu>
Cc: Li Xi <pkuelelixi@gmail.com>
Subject: How to add new fields into inode?
Date: Wed, 25 Feb 2015 14:02:13 +0300 [thread overview]
Message-ID: <54EDABB5.5020806@yandex-team.ru> (raw)
Currently I'm working on (yet another attempt of) project id and quota
for ext4. Obviously I want to add new u32 field into inode for holding
it's project id.
As I see policy for that isn't well defined:
Kernel tries to allocate extra space according to sizeof(struct
ext4_inode). If EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE is set then it takes
maximum of sizeof, s_want_extra_isize and s_min_extra_isize.
Libext2fs always allocates space for it's own structure and in some
cases checks s_want_extra_isize but without checking related feature.
Thus in some cases default extra size of inodes doesn't depend on
present features and changes if we add new fields into structure.
For example expected output of some unit tests depends on that value.
Question is: it's ok to waste some bytes for unused fields at the of
inode or default extra size should depend on actually enabled features?
--
Konstantin
next reply other threads:[~2015-02-25 11:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 11:02 Konstantin Khlebnikov [this message]
2015-02-27 7:52 ` How to add new fields into inode? Andreas Dilger
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=54EDABB5.5020806@yandex-team.ru \
--to=khlebnikov@yandex-team.ru \
--cc=linux-ext4@vger.kernel.org \
--cc=pkuelelixi@gmail.com \
--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