Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1536138

Re: [PATCH 1/4] statx: Add a system call to make enhanced file info available [ver #3]

From Miklos Szeredi <miklos@szeredi.hu>
Newsgroups linux.kernel
Subject Re: [PATCH 1/4] statx: Add a system call to make enhanced file info available [ver #3]
Date 2016-12-05 15:50 +0100
Message-ID <sL2KC-5N1-23@gated-at.bofh.it> (permalink)
References <sGu4N-6a5-5@gated-at.bofh.it> <sGu4N-6a5-3@gated-at.bofh.it> <sKwKJ-2uH-5@gated-at.bofh.it> <sKIVA-1GG-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH 1/4] statx: Add a system call to make enhanced file info  available [ver #3] Al Viro <viro@ZenIV.linux.org.uk> - 2016-12-04 05:40 +0100
  Re: [PATCH 1/4] statx: Add a system call to make enhanced file info  available [ver #3] Al Viro <viro@ZenIV.linux.org.uk> - 2016-12-04 17:10 +0100
    Re: [PATCH 1/4] statx: Add a system call to make enhanced file info available [ver #3] David Howells <dhowells@redhat.com> - 2016-12-05 16:40 +0100
  Re: [PATCH 1/4] statx: Add a system call to make enhanced file info  available [ver #3] Al Viro <viro@ZenIV.linux.org.uk> - 2016-12-04 18:40 +0100
    Re: [PATCH 1/4] statx: Add a system call to make enhanced file info  available [ver #3] Miklos Szeredi <miklos@szeredi.hu> - 2016-12-05 15:50 +0100

csiph-web