From: Jamie Lokier <jamie@shareable.org>
To: Oleg Drokin <green@linuxhacker.ru>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: Attempt at "stat light" implementation
Date: Tue, 7 Apr 2009 18:54:44 +0100 [thread overview]
Message-ID: <20090407175444.GE31824@shareable.org> (raw)
In-Reply-To: <0891A741-6527-4BDE-9F6C-FD8FAA45E2F1@linuxhacker.ru>
Oleg Drokin wrote:
> Hello!
> Sure. When they append to sturct stat, they would add new bits.
> We have 32 bits in the flags, then 3 bits are already used for AT*
> flags.
> That leaves us with 29 bits for STAT_* (or perhaps AT_STAT) flags, and
> we already use ~15 fields in the struct stat, do we have enough bits,
> or should we increase the flags width right now while we are at it?
I don't see all 31 bits being used up in the foreseeable future. So
it's fine as long as you (in future) make the last one
__AT_STAT_MORE_FLAGS causing an additional syscall argument to be
interpreted for more flags. Glibc would wrap it up.
> >Once you have fine-grained selection of stat fields - it's natural to
> >ask why not allow _additional_ stat fields in an future-extensible
> >fashion? A few things would be handy sometimes, such as inode
> >generation number, modification generation number (to detect changes
> >across reboots), and extra flags indicating COW or other properties.
>
> >If an "extensible" attribute is not asked for, the kernel must not
> >fill in that field of the structure as the app may be not have
> >allocated space for it. Or it must use a tag-length-value sort of
> >structure for the result, similar to network CMSGs.
>
> The app allocates struct stat, whatever it is, I presume. There is a
> huge benefit to actually reuse existing struct stat, I believe.
I agree, but you can't fill in unwanted _additional_ fields if you add
any to the kernel's "struct stat" (or "struct stat_extended" which is
binary compatible but has additional fields). If you do that, _old_
apps will allocate a smaller structure than the kernel is using.
-- Jamie
next prev parent reply other threads:[~2009-04-07 17:54 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-07 6:23 Attempt at "stat light" implementation Oleg Drokin
2009-04-07 10:23 ` Andreas Dilger
2009-04-07 14:54 ` Oleg Drokin
2009-04-07 17:52 ` Christoph Hellwig
2009-04-07 15:22 ` jim owens
2009-04-07 15:38 ` Oleg Drokin
2009-04-07 16:20 ` jim owens
2009-04-07 17:32 ` Jamie Lokier
2009-04-07 17:38 ` Jeff Garzik
2009-04-07 17:56 ` Jamie Lokier
2009-04-07 18:21 ` Andreas Dilger
2009-04-07 19:30 ` Ulrich Drepper
2009-04-12 20:55 ` Jamie Lokier
2009-04-07 17:41 ` Oleg Drokin
2009-04-07 17:54 ` Jamie Lokier [this message]
2009-04-07 18:00 ` Oleg Drokin
2009-04-07 18:18 ` Andreas Dilger
2009-04-07 18:31 ` Nicholas Miell
2009-04-07 17:49 ` Christoph Hellwig
2009-04-07 17:56 ` Oleg Drokin
2009-04-07 18:28 ` Andreas Dilger
2009-04-07 18:50 ` Jamie Lokier
2009-04-07 19:48 ` Jeff Garzik
2009-04-07 19:47 ` Jeff Garzik
2009-04-07 20:18 ` Evgeniy Polyakov
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=20090407175444.GE31824@shareable.org \
--to=jamie@shareable.org \
--cc=green@linuxhacker.ru \
--cc=linux-fsdevel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.