lkml.org 
[lkml]   [2014]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/11] vfs: add renameat2 syscall
On Wed, Jan 15, 2014 at 07:11:16AM +0900, Tetsuo Handa wrote:
> Miklos Szeredi wrote:
> > +
> > + if (flags)
> > + return -EOPNOTSUPP;
> > +
>
> If (at least for now) only ext4 interprets renameat2() flags,
> I think adding a new member to "struct inode_operations" and
> check it like
>
> if (!old_dir->i_op->swapname)
> return -EOPNOTSUPP;
>
> or

This is not just about swapname, but other rename variants too (non-overwriting
rename is also included in the patchset).

>
> if (!(old_dir->i_op->supported_features & flags))
> return -EOPNOTSUPP;

Or rather old_dir->i_sb->s_type->fs_flags. We access it due to
FS_RENAME_DOES_D_MOVE anyway.

I like this variant, because now filesystems need to explicitly add a flag to
*enable* the functionality and not a check to disable it.

Objections?

Thanks,
Miklos


\
 
 \ /
  Last update: 2014-01-15 12:01    [W:0.422 / U:1.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site