From: David Howells <dhowells@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: dhowells@redhat.com, viro@zeniv.linux.org.uk, smfrench@gmail.com,
jlayton@redhat.com, mcao@us.ibm.com,
aneesh.kumar@linux.vnet.ibm.com, linux-cifs@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
samba-technical@lists.samba.org, sjayaraman@suse.de,
linux-ext4@vger.kernel.org
Subject: Re: [PATCH 3/3] Add a pair of system calls to make extended file stats available [ver #2]
Date: Wed, 30 Jun 2010 11:01:08 +0100 [thread overview]
Message-ID: <29346.1277892068@redhat.com> (raw)
In-Reply-To: <201006301131.37241.arnd@arndb.de>
Arnd Bergmann <arnd@arndb.de> wrote:
> It also makes things like strace more complicated.
That's the most compelling argument.
> No, I think that would be worse than the current version. But if you remove
> the structure version in favor of the flags, you only need six arguments
> anyway.
I want to keep the structure version, just in case we need to expand fields in
the stat struct in future. Otherwise we may need to create yet another stat
syscall.
> You can also go further and fold the structure length into flags, because
> the length is just a function of the data you are passing.
The potential problem with passing the flags as a syscall argument is that
we're then limited to a single 32-bit integer. It might be enough, but if I
do as at least one person has suggested and assign each field in the struct
its own bit, that uses up half right there, plus I'd like to add at least one
operational flag (to force synchronisation with the server).
> Having a system call with flags, size and version is like wearing a belt,
> braces and suspenders. An unsigned long flags argument should be enough to
> hold up your pants[1].
I would like the size argument for two reasons: firstly, to prevent buffer
overruns and, secondly, because I can see some scope for variable-size fields
(such as for volume IDs or security labels), though the latter might be better
handled through getxattr() (which would mean extra overhead).
David
next prev parent reply other threads:[~2010-06-30 10:01 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-30 1:16 [PATCH 0/3] Extended file stat functions [ver #2] David Howells
2010-06-30 1:17 ` [PATCH 1/3] Mark arguments to certain syscalls as being const " David Howells
2010-06-30 1:17 ` [PATCH 2/3] AFS: Use i_generation not i_version for the vnode uniquifier " David Howells
2010-06-30 1:17 ` [PATCH 3/3] Add a pair of system calls to make extended file stats available " David Howells
2010-06-30 1:48 ` Trond Myklebust
2010-06-30 9:33 ` Andreas Dilger
[not found] ` <CE3451EE-F8B2-47EF-AC1C-4EEEBE68B30F-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org>
2010-06-30 9:47 ` David Howells
2010-06-30 2:32 ` Nicholas Miell
2010-06-30 8:30 ` Arnd Bergmann
2010-06-30 8:55 ` David Howells
2010-06-30 9:31 ` Arnd Bergmann
2010-06-30 10:01 ` David Howells [this message]
[not found] ` <29346.1277892068-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-06-30 11:46 ` Arnd Bergmann
2010-06-30 12:14 ` David Howells
[not found] ` <26650.1277900050-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-06-30 12:44 ` Arnd Bergmann
2010-06-30 9:45 ` Andreas Dilger
[not found] ` <B82FC7EE-93D2-4D86-906D-5D6AFA502709-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org>
2010-06-30 10:22 ` David Howells
2010-06-30 11:04 ` [PATCH 0/3] Extended file stat functions " Andreas Dilger
2010-06-30 12:05 ` David Howells
2010-06-30 12:11 ` Christoph Hellwig
2010-06-30 13:31 ` Arnd Bergmann
2010-06-30 14:05 ` Jeff Layton
[not found] ` <20100630100553.707785c7-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-06-30 17:36 ` Arnd Bergmann
2010-06-30 12:23 ` David Howells
[not found] ` <26505.1277899544-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-06-30 21:45 ` Andreas Dilger
[not found] ` <FB78A152-53D3-4000-ABDB-9D6051ECB887-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org>
2010-06-30 23:15 ` David Howells
2010-06-30 23:27 ` H. Peter Anvin
2010-07-01 0:15 ` David Howells
[not found] ` <8331.1277943337-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-07-01 3:20 ` H. Peter Anvin
[not found] ` <30875.1277939713-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-07-01 4:57 ` Andreas Dilger
[not found] ` <84225B35-7365-4DE2-8920-5741011B347C-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org>
2010-07-01 8:09 ` Arnd Bergmann
2010-07-05 23:52 ` Brad Boyer
2013-11-26 10:40 ` Jan Kara
[not found] ` <20131126104034.GA4854-+0h/O2h83AeN3ZZ/Hiejyg@public.gmane.org>
2013-11-28 13:07 ` David Howells
2013-11-28 13:57 ` Jan Kara
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=29346.1277892068@redhat.com \
--to=dhowells@redhat.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=arnd@arndb.de \
--cc=jlayton@redhat.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcao@us.ibm.com \
--cc=samba-technical@lists.samba.org \
--cc=sjayaraman@suse.de \
--cc=smfrench@gmail.com \
--cc=viro@zeniv.linux.org.uk \
/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).