linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: David Howells <dhowells@redhat.com>,
	linux-fsdevel@vger.kernel.org,
	Linux API <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: Mon, 5 Dec 2016 15:49:12 +0100	[thread overview]
Message-ID: <CAJfpeguM2cvzbfKRzPJUNbccXUBS6o0rv9j=qE_XfdnZpqAZ7g@mail.gmail.com> (raw)
In-Reply-To: <20161204173317.GH1555@ZenIV.linux.org.uk>

On Sun, Dec 4, 2016 at 6:33 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> On Sun, Dec 04, 2016 at 04:38:05AM +0000, Al Viro wrote:
>
>> 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.
>
> FWIW, there's a bit of abuse of struct kstat in overlayfs object
> creation paths - for one thing, it ends up with a very small subset
> of struct kstat (mode + rdev), for another it also needs link in
> case of symlinks and ends up passing it separately.
>
> IMO it would be better to introduce a separate object for that; does anybody
> have objections to something like the patch below?  In principle, we might
> even lift that thing into general API and switch ->mkdir()/->mknod()/->symlink()
> to identical calling conventions.  Hell knows, perhaps ->create() as well...
> Comments?

Good cleanup.  Applied, thanks.

Miklos

  reply	other threads:[~2016-12-05 14:49 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)
2016-11-23 22:42     ` Andreas Dilger
2016-11-23 22:57     ` Andreas Dilger
2016-11-24  8:13       ` Michael Kerrisk (man-pages)
2016-11-24  2:08   ` Andreas Dilger
2016-11-24  7:27   ` David Howells
2016-12-04  4:00   ` Al Viro
2016-12-04  4:38   ` Al Viro
2016-12-04 16:05     ` Al Viro
2016-12-04 17:33     ` Al Viro
2016-12-05 14:49       ` Miklos Szeredi [this message]
2016-12-05 15:37     ` David Howells
2016-11-23  0:55 ` [PATCH 2/4] statx: Ext4: Return enhanced file attributes " David Howells
2016-11-23 17:59   ` Andreas Dilger
2016-11-23  0:56 ` [PATCH 3/4] statx: NFS: " David Howells
2016-11-23  0:56 ` [PATCH 4/4] statx: AFS: " David Howells
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='CAJfpeguM2cvzbfKRzPJUNbccXUBS6o0rv9j=qE_XfdnZpqAZ7g@mail.gmail.com' \
    --to=miklos@szeredi.hu \
    --cc=dhowells@redhat.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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).