Re: [PATCH v3 01/18] vfs: add fileattr ops

2021-04-13 Thread Miklos Szeredi
On Tue, Apr 13, 2021 at 4:46 PM Matthew Wilcox wrote: > > On Thu, Mar 25, 2021 at 08:37:38PM +0100, Miklos Szeredi wrote: > > @@ -107,6 +110,8 @@ fiemap: no > > update_time: no > > atomic_open: shared (exclusive if O_CREAT is set in open flags) > > tmpfile: no > > +fileattr_get:

Re: [PATCH v3 01/18] vfs: add fileattr ops

2021-04-13 Thread Matthew Wilcox
On Thu, Mar 25, 2021 at 08:37:38PM +0100, Miklos Szeredi wrote: > @@ -107,6 +110,8 @@ fiemap: no > update_time: no > atomic_open: shared (exclusive if O_CREAT is set in open flags) > tmpfile: no > +fileattr_get:no or exclusive > +fileattr_set:exclusive >

Re: [PATCH v3 01/18] vfs: add fileattr ops

2021-03-29 Thread Miklos Szeredi
On Sun, Mar 28, 2021 at 8:08 PM Al Viro 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)) > > +

Re: [PATCH v3 01/18] vfs: add fileattr ops

2021-03-28 Thread Al Viro
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

[PATCH v3 01/18] vfs: add fileattr ops

2021-03-25 Thread Miklos Szeredi
There's a substantial amount of boilerplate in filesystems handling FS_IOC_[GS]ETFLAGS/ FS_IOC_FS[GS]ETXATTR ioctls. Also due to userspace buffers being involved in the ioctl API this is difficult to stack, as shown by overlayfs issues related to these ioctls. Introduce a new internal API named