lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 23 Aug 2016 19:24:39 +0300
From:   Boaz Harrosh <ooo@...ctrozaur.com>
To:     Miklos Szeredi <mszeredi@...hat.com>, linux-fsdevel@...r.kernel.org
CC:     linux-kernel@...r.kernel.org, Al Viro <viro@...iv.linux.org.uk>,
        Eric Van Hensbergen <ericvh@...il.com>,
        David Howells <dhowells@...hat.com>,
        Ilya Dryomov <idryomov@...il.com>,
        Jan Harkes <jaharkes@...cmu.edu>,
        Tyler Hicks <tyhicks@...onical.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Oleg Drokin <oleg.drokin@...el.com>,
        Trond Myklebust <trond.myklebust@...marydata.com>,
        Mark Fasheh <mfasheh@...e.com>,
        Mike Marshall <hubcap@...ibond.com>
Subject: Re: [PATCH 4/7] fs: make remaining filesystems use .rename2

On 08/23/2016 05:05 PM, Miklos Szeredi wrote:
> This is trivial to do:
> 
>  - add flags argument to foo_rename()
>  - check if flags is zero
>  - assign foo_rename() to .rename2 instead of .rename
> 
> This doesn't mean it's impossible to support RENAME_NOREPLACE for these
> filesystems, but it is not trivial, like for local filesystems.
> RENAME_NOREPLACE must guarantee atomicity (i.e. it shouldn't be possible
> for a file to be created on one host while it is overwritten by rename on
> another host).
> 
> Filesystems converted:
> 
> 9p, afs, ceph, coda, ecryptfs, exofs, kernfs, lustre, ncpfs, nfs, ocfs2,
> orangefs.
> 
> After this, we can get rid of the duplicate interfaces for rename.
> 
> Signed-off-by: Miklos Szeredi <mszeredi@...hat.com>
> Cc: Eric Van Hensbergen <ericvh@...il.com>
> Cc: David Howells <dhowells@...hat.com>
> Cc: Ilya Dryomov <idryomov@...il.com>
> Cc: Jan Harkes <jaharkes@...cmu.edu>
> Cc: Tyler Hicks <tyhicks@...onical.com>
> Cc: Boaz Harrosh <ooo@...ctrozaur.com>

Hi exofs is not a distributed file system in the nfs-client 
sense. All meta-data operations happen on the single exofs mount.
The distribution of an exofs cluster is done by an NFSD-like daemon
that supports pNFS, and an std pNFS-client.
So the code you see below is just the same as an ext4 FS with
a raid of iscsi devices below it. (Even if then later this FS is
exported by an NFSD server)

That said it is fine as is don't sweat over this unused FS so:
ACK-by: Boaz Harrosh <ooo@...ctrozaur.com>

<>

> diff --git a/fs/exofs/namei.c b/fs/exofs/namei.c
> index 622a686bb08b..897280163f3c 100644
> --- a/fs/exofs/namei.c
> +++ b/fs/exofs/namei.c
> @@ -227,7 +227,8 @@ static int exofs_rmdir(struct inode *dir, struct dentry *dentry)
>  }
>  
>  static int exofs_rename(struct inode *old_dir, struct dentry *old_dentry,
> -		struct inode *new_dir, struct dentry *new_dentry)
> +			struct inode *new_dir, struct dentry *new_dentry,
> +			unsigned int flags)
>  {
>  	struct inode *old_inode = d_inode(old_dentry);
>  	struct inode *new_inode = d_inode(new_dentry);
> @@ -237,6 +238,9 @@ static int exofs_rename(struct inode *old_dir, struct dentry *old_dentry,
>  	struct exofs_dir_entry *old_de;
>  	int err = -ENOENT;
>  
> +	if (flags)
> +		return -EINVAL;
> +
>  	old_de = exofs_find_entry(old_dir, old_dentry, &old_page);
>  	if (!old_de)
>  		goto out;
> @@ -310,7 +314,7 @@ const struct inode_operations exofs_dir_inode_operations = {
>  	.mkdir  	= exofs_mkdir,
>  	.rmdir  	= exofs_rmdir,
>  	.mknod  	= exofs_mknod,
> -	.rename 	= exofs_rename,
> +	.rename2	= exofs_rename,
>  	.setattr	= exofs_setattr,
>  };
>  
<>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ