Re: [RFC] vfs: skip extra attributes check on removal for symlinks

2018-05-10 Thread Al Viro
On Thu, May 10, 2018 at 11:05:51PM +, Luis R. Rodriguez wrote: > On Thu, May 10, 2018 at 09:48:07PM +0100, Al Viro wrote: > > On Thu, Apr 26, 2018 at 04:46:39PM -0700, Luis R. Rodriguez wrote: > > > > > Since we cannot set these attributes we should special-case the > > > immutable/append on d

Re: [RFC] vfs: skip extra attributes check on removal for symlinks

2018-05-10 Thread Luis R. Rodriguez
On Thu, May 10, 2018 at 09:48:07PM +0100, Al Viro wrote: > On Thu, Apr 26, 2018 at 04:46:39PM -0700, Luis R. Rodriguez wrote: > > > Since we cannot set these attributes we should special-case the > > immutable/append on delete for symlinks, this would be consistent with > > what we *do* allow on L

Re: [RFC] vfs: skip extra attributes check on removal for symlinks

2018-05-10 Thread Al Viro
On Thu, Apr 26, 2018 at 04:46:39PM -0700, Luis R. Rodriguez wrote: > Since we cannot set these attributes we should special-case the > immutable/append on delete for symlinks, this would be consistent with > what we *do* allow on Linux for all filesystems. Er... So why not simply sanity-check it

Re: [RFC] vfs: skip extra attributes check on removal for symlinks

2018-05-08 Thread Darrick J. Wong
On Wed, May 09, 2018 at 12:38:55AM +, Luis R. Rodriguez wrote: > On Tue, May 08, 2018 at 05:17:41PM -0700, Darrick J. Wong wrote: > > On Wed, May 09, 2018 at 12:03:28AM +, Luis R. Rodriguez wrote: > > > Groovy, thanks, let's not forget the xfs_repair respective fix :) let me > > > know > >

Re: [RFC] vfs: skip extra attributes check on removal for symlinks

2018-05-08 Thread Luis R. Rodriguez
On Tue, May 08, 2018 at 05:17:41PM -0700, Darrick J. Wong wrote: > On Wed, May 09, 2018 at 12:03:28AM +, Luis R. Rodriguez wrote: > > Groovy, thanks, let's not forget the xfs_repair respective fix :) let me > > know > > if you have any feedback on that. > > TBH I've lost any proposed xfs_repa

Re: [RFC] vfs: skip extra attributes check on removal for symlinks

2018-05-08 Thread Darrick J. Wong
On Wed, May 09, 2018 at 12:03:28AM +, Luis R. Rodriguez wrote: > On Mon, May 07, 2018 at 05:30:55PM -0700, Darrick J. Wong wrote: > > On Tue, May 01, 2018 at 05:45:12PM +, Luis R. Rodriguez wrote: > > > On Tue, May 01, 2018 at 10:23:19AM -0700, Darrick J. Wong wrote: > > > > On Thu, Apr 26,

Re: [RFC] vfs: skip extra attributes check on removal for symlinks

2018-05-08 Thread Luis R. Rodriguez
On Mon, May 07, 2018 at 05:30:55PM -0700, Darrick J. Wong wrote: > On Tue, May 01, 2018 at 05:45:12PM +, Luis R. Rodriguez wrote: > > On Tue, May 01, 2018 at 10:23:19AM -0700, Darrick J. Wong wrote: > > > On Thu, Apr 26, 2018 at 04:46:39PM -0700, Luis R. Rodriguez wrote: > > > > Linux filesyste

Re: [RFC] vfs: skip extra attributes check on removal for symlinks

2018-05-07 Thread Darrick J. Wong
On Tue, May 01, 2018 at 05:45:12PM +, Luis R. Rodriguez wrote: > On Tue, May 01, 2018 at 10:23:19AM -0700, Darrick J. Wong wrote: > > On Thu, Apr 26, 2018 at 04:46:39PM -0700, Luis R. Rodriguez wrote: > > > Linux filesystems cannot set extra file attributes (stx_attributes as per > > > statx(2)

Re: [RFC] vfs: skip extra attributes check on removal for symlinks

2018-05-01 Thread Luis R. Rodriguez
On Tue, May 01, 2018 at 10:23:19AM -0700, Darrick J. Wong wrote: > On Thu, Apr 26, 2018 at 04:46:39PM -0700, Luis R. Rodriguez wrote: > > Linux filesystems cannot set extra file attributes (stx_attributes as per > > statx(2)) on a symbolic link. To set extra file attributes you issue > > ioctl(2) w

Re: [RFC] vfs: skip extra attributes check on removal for symlinks

2018-05-01 Thread Darrick J. Wong
On Thu, Apr 26, 2018 at 04:46:39PM -0700, Luis R. Rodriguez wrote: > Linux filesystems cannot set extra file attributes (stx_attributes as per > statx(2)) on a symbolic link. To set extra file attributes you issue > ioctl(2) with FS_IOC_SETFLAGS, *all* ioctl(2) calls on a symbolic link > yield EBAD

[RFC] vfs: skip extra attributes check on removal for symlinks

2018-04-26 Thread Luis R. Rodriguez
Linux filesystems cannot set extra file attributes (stx_attributes as per statx(2)) on a symbolic link. To set extra file attributes you issue ioctl(2) with FS_IOC_SETFLAGS, *all* ioctl(2) calls on a symbolic link yield EBADF. This is because ioctl(2) tries to obtain struct fd from the symbolic li