[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJfpegsKkFV6yky8rm+XWJNKRChwvVR9NnuWzTCLreB3pf8X2Q@mail.gmail.com>
Date: Mon, 29 Mar 2021 10:11:04 +0200
From: Miklos Szeredi <miklos@...redi.hu>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Miklos Szeredi <mszeredi@...hat.com>,
linux-fsdevel@...r.kernel.org,
"Darrick J . Wong" <djwong@...nel.org>,
Amir Goldstein <amir73il@...il.com>,
David Sterba <dsterba@...e.cz>,
Christian Brauner <christian.brauner@...ntu.com>,
Eric Biggers <ebiggers@...nel.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 01/18] vfs: add fileattr ops
On Sun, Mar 28, 2021 at 8:08 PM Al Viro <viro@...iv.linux.org.uk> wrote:
>
> On Thu, Mar 25, 2021 at 08:37:38PM +0100, Miklos Szeredi wrote:
>
> > +int vfs_fileattr_get(struct dentry *dentry, struct fileattr *fa)
> > +{
> > + struct inode *inode = d_inode(dentry);
> > +
> > + if (d_is_special(dentry))
> > + return -ENOTTY;
>
> FWIW - why? For uses via ioctl() you simply won't get there with
> device nodes et.al. - they have file_operations of their own.
Yes it will: this is called by the vfs, not the filesystem.
> If we add syscall(s) for getting/setting those, there's no reason
> for e.g. a device node not to have those attributes...
Fair enough, but I guess filesystems will need to explicitly enable
support for these attributes on special files.
We can move that check inside filesystems now, or we can move it
later, when actually needed. Which do you prefer? (only a couple of
filesystems are affected, IIRC, which don't have separate i_ops for
regular and special files).
Thanks,
Miklos
Powered by blists - more mailing lists