From: Al Viro <viro@ZenIV.linux.org.uk>
To: David Howells <dhowells@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] statx: Add a system call to make enhanced file info available [ver #3]
Date: Sun, 4 Dec 2016 04:38:05 +0000 [thread overview]
Message-ID: <20161204043803.GA1022@ZenIV.linux.org.uk> (raw)
In-Reply-To: <147986255194.19139.9583434946564699577.stgit@warthog.procyon.org.uk>
On Wed, Nov 23, 2016 at 12:55:51AM +0000, David Howells wrote:
> + * vfs_xgetattr - Get the enhanced basic attributes of a file
> + * @path: The file of interest
> + * @stat: Where to return the statistics
> + *
> + * Ask the filesystem for a file's attributes. The caller must have preset
> + * stat->request_mask and stat->query_flags to indicate what they want.
> + *
> + * If the file is remote, the filesystem can be forced to update the attributes
> + * from the backing store by passing AT_FORCE_ATTR_SYNC in query_flags or can
> + * suppress the update by passing AT_NO_ATTR_SYNC.
> + *
> + * Bits must have been set in stat->request_mask to indicate which attributes
> + * the caller wants retrieving. Any such attribute not requested may be
> + * returned anyway, but the value may be approximate, and, if remote, may not
> + * have been synchronised with the server.
I understand wanting to avoid extra arguments, but you are asking for trouble
with that sort of calling conventions. Verifying that all call chains have
these fields initialized is bloody unpleasant and it *is* going to break,
especially since the rules are "you need to initialize it for vfs_xgetattr(),
but not for vfs_getattr()" - the names are similar enough for confusion,
and that's not the only such pair.
next prev parent reply other threads:[~2016-12-04 4:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-23 0:55 [RFC][PATCH 0/4] Enhanced file stat system call [ver #3] David Howells
2016-11-23 0:55 ` [PATCH 1/4] statx: Add a system call to make enhanced file info available " David Howells
2016-11-23 8:37 ` Michael Kerrisk (man-pages)
[not found] ` <768343b5-e9b4-a86c-53de-2929bc290342-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-11-23 22:42 ` Andreas Dilger
2016-11-23 22:57 ` Andreas Dilger
[not found] ` <19284F6D-73B9-4A1A-8227-2B2B87F29FE9-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org>
2016-11-24 8:13 ` Michael Kerrisk (man-pages)
[not found] ` <147986255194.19139.9583434946564699577.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2016-11-24 2:08 ` Andreas Dilger
[not found] ` <D1A5E76A-5739-42FE-A451-B49CD1699DB0-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org>
2016-11-24 7:27 ` David Howells
2016-12-04 4:00 ` Al Viro
2016-12-04 4:38 ` Al Viro [this message]
2016-12-04 16:05 ` Al Viro
[not found] ` <20161204043803.GA1022-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2016-12-04 17:33 ` Al Viro
[not found] ` <20161204173317.GH1555-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2016-12-05 14:49 ` Miklos Szeredi
[not found] ` <20161204160504.GG1555-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2016-12-05 15:37 ` David Howells
2016-11-23 0:55 ` [PATCH 2/4] statx: Ext4: Return enhanced file attributes " David Howells
[not found] ` <147986255921.19139.6012507332848890196.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2016-11-23 17:59 ` Andreas Dilger
2016-11-23 0:56 ` [PATCH 3/4] statx: NFS: " David Howells
[not found] ` <147986254484.19139.8038609825799670925.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2016-11-23 0:56 ` [PATCH 4/4] statx: AFS: " David Howells
[not found] ` <147986257312.19139.10417237189956494459.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2016-11-24 2:06 ` 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=20161204043803.GA1022@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=dhowells@redhat.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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 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).