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

From: Jeff Layton
Date: Fri Nov 18 2016 - 07:02:05 EST


On Fri, 2016-11-18 at 08:48 +0000, David Howells wrote:
> Jeff Layton <jlayton@xxxxxxxxxx> wrote:
>
> >
> > >
> > > If neither AT_STATX_*_SYNC flag is set, the behaviour is the default for
> > > stat() on that filesystem.
> > >
> >
> > We also need to specify here what happens if both bits are set. Should
> > that be -EINVAL?
>
> Makes sense.
>
> This leads to another thought: should fstatat() be allowed to take AT_STATX_*
> flags?
>
> David

In principle, we could. fstatat currently rejects flags that it doesn't
understand with -EINVAL.

That said, I'd vote no -- if you wanted to change an application to
start setting these flags in fstatat calls, then it's just as simple to
convert it over to use statx. I don't see a lot of benefit in adding
that to a legacy syscall.

--
Jeff Layton <jlayton@xxxxxxxxxx>