[Cluster-devel] [GFS2 PATCH] GFS2: Simplify directory filling, hashing and unhashing functions

2014-11-19 Thread Bob Peterson
Hi, This patch implements a new cookie encoding scheme for encoding, decoding and filling directory entries. This new scheme prevents duplicate cookies, so it eliminates the need to sort the entries to prevent duplicates. Thus, it simplies the code greatly. Regards, Bob Peterson Red Hat File

[Cluster-devel] [PATCH 1/3] gfs2: bugger off early if O_CREAT open finds a directory

2014-11-19 Thread Al Viro
Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- fs/gfs2/inode.c |5 + 1 file changed, 5 insertions(+) diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index c4ed823..310e248 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -624,6 +624,11 @@ static int gfs2_create_inode(struct inode

[Cluster-devel] [gfs2 patches in vfs.git]

2014-11-19 Thread Al Viro
This stuff is around -atomic_open() and my main goal here is to eliminate the cases when d_splice_alias() is used on a hashed dentry. Patches in question sit in vfs.git#for-gfs2, and that branch isn't going to be rebased; I'd prefer if it was pulled instead of having them applied manually.

[Cluster-devel] [PATCH 3/3] gfs2_atomic_open(): simplify the use of finish_no_open()

2014-11-19 Thread Al Viro
In -atomic_open(inode, dentry, file, opened) calling finish_no_open(file, NULL) is equivalent to dget(dentry); return finish_no_open(file, dentry); No need to open-code that... Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- fs/gfs2/inode.c |7 ++- 1 file changed, 2 insertions(+), 5

[Cluster-devel] [PATCH 2/3] gfs2_create_inode(): don't bother with d_splice_alias()

2014-11-19 Thread Al Viro
dentry is always hashed and negative, inode - non-error, non-NULL and non-directory. In such conditions d_splice_alias() is equivalent to d_instantiate(dentry, inode) and return NULL, which simplifies the downstream code and is consistent with the have to create a new object case. Signed-off-by:

Re: [Cluster-devel] [PATCH 1/3] gfs2: bugger off early if O_CREAT open finds a directory

2014-11-19 Thread Bob Peterson
- Original Message - Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- fs/gfs2/inode.c |5 + 1 file changed, 5 insertions(+) diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index c4ed823..310e248 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -624,6 +624,11 @@

Re: [Cluster-devel] [PATCH 1/3] gfs2: bugger off early if O_CREAT open finds a directory

2014-11-19 Thread Al Viro
On Wed, Nov 19, 2014 at 03:33:29PM -0500, Bob Peterson wrote: - Original Message - Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- fs/gfs2/inode.c |5 + 1 file changed, 5 insertions(+) diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index c4ed823..310e248 100644

Re: [Cluster-devel] [PATCH 1/3] gfs2: bugger off early if O_CREAT open finds a directory

2014-11-19 Thread Bob Peterson
- Original Message - On Wed, Nov 19, 2014 at 03:33:29PM -0500, Bob Peterson wrote: - Original Message - Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- fs/gfs2/inode.c |5 + 1 file changed, 5 insertions(+) diff --git a/fs/gfs2/inode.c

[Cluster-devel] gfs2: use kvfree() instead of open-coding it

2014-11-19 Thread Al Viro
Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- fs/gfs2/dir.c | 40 fs/gfs2/quota.c |9 ++--- 2 files changed, 10 insertions(+), 39 deletions(-) diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 5d4261f..c247fed 100644 --- a/fs/gfs2/dir.c

[Cluster-devel] gfs2: gfs2_dir_get_hash_table(): avoiding deferred vfree() is easy here...

2014-11-19 Thread Al Viro
vfree() is allowed under spinlock these days, but it's cheaper when it doesn't step into deferred case and here it's very easy to avoid. Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- fs/gfs2/dir.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/gfs2/dir.c