Re: [PATCH 00/18] new API for FS_IOC_[GS]ETFLAGS/FS_IOC_FS[GS]ETXATTR

From: Matthew Wilcox
Date: Wed Feb 03 2021 - 08:59:20 EST


On Wed, Feb 03, 2021 at 02:13:27PM +0100, Miklos Szeredi wrote:
> On Wed, Feb 3, 2021 at 2:08 PM Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
> >
> > On Wed, Feb 03, 2021 at 01:40:54PM +0100, Miklos Szeredi wrote:
> > > This series adds the infrastructure and conversion of filesystems to the
> > > new API.
> > >
> > > Two filesystems are not converted: FUSE and CIFS, as they behave
> > > differently from local filesystems (use the file pointer, don't perform
> > > permission checks). It's likely that these two can be supported with minor
> > > changes to the API, but this requires more thought.
> >
> > Why not change the API now? ie pass the file instead of the dentry?
>
> These are inode attributes we are talking about, not much sense in
> passing an open file to the filesystem. That was/is due to ioctl
> being an fd based API.

You might as well say "Not much point passing a dentry to the filesystem"
and just pass the inode.

> It would make more sense to convert these filesystems to use a dentry
> instead of a file pointer. Which is not trivial, unfortuantely.

Network filesystems frequently need to use the credentials attached to
a struct file in order to communicate with the server. There's no point
fighting this reality.