Re: [Cluster-devel] [PATCH 04/18] fs: add generic xattr_acl handlers

2013-12-12 Thread Andreas Gruenbacher
Christoph, +static int +posix_acl_xattr_set(struct dentry *dentry, const char *name, + const void *value, size_t size, int flags, int type) +{ + struct inode *inode = dentry-d_inode; + struct posix_acl *acl = NULL; + int ret; + + if (!IS_POSIXACL(inode)) +

Re: [Cluster-devel] [PATCH 16/18] gfs2: use generic posix ACL infrastructure

2013-12-12 Thread Andreas Gruenbacher
Christoph, gfs2 has a left-over get_acl callback in gfs2_symlink_iops in fs/gfs2/inode.c, from a long time ago, which should be removed as well. Andreas

Re: [Cluster-devel] 3.18.5 kernel panic: fs/gfs2/acl.c:76

2015-02-06 Thread Andreas Gruenbacher
Andrew, 3.18.5 kernel crashing on acl deletion: null pointer dereference in fs/gfs2/acl.c:76 this bug seems to exist since commit 2646a1f6 from October 2009. fix we're using currently: --- fs/gfs2/acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Cluster-devel] [PATCH] GFS2: gfs2_set_acl(): Cache no acl as well

2015-02-12 Thread Andreas Gruenbacher
with forget_cached_acl(). Signed-off-by: Andreas Gruenbacher agrue...@redhat.com --- fs/gfs2/acl.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c index 7b31430..1be3b06 100644 --- a/fs/gfs2/acl.c +++ b/fs/gfs2/acl.c @@ -110,11 +110,7 @@ int gfs2_set_acl

Re: [Cluster-devel] [PATCH] GFS2: Fix potential NULL dereference in gfs2_alloc_inode

2015-03-02 Thread Andreas Gruenbacher
On 03/02/2015 05:30 PM, Andrew Price wrote: On 02/03/15 16:17, Steven Whitehouse wrote: Hi, On 02/03/15 16:15, Andrew Price wrote: Ah, so it is. Self-NACK then. The patch itself is still worth it though, it's not self-evident ip and ip-i_inode are the same. Andreas

Re: [Cluster-devel] [GFS2 PATCH 1/2][TRY #2] GFS2: Move glock superblock pointer to field gl_name

2015-08-22 Thread Andreas Gruenbacher
Bob, how hard would it be to move the rhashtable into struct gfs2_sbd instead? Thanks, Andreas

Re: [Cluster-devel] [GFS2 PATCH 2/2] GFS2: Use resizable hash table for glocks

2015-08-24 Thread Andreas Gruenbacher
Bob, 2015-07-09 20:25 GMT+02:00 Bob Peterson rpete...@redhat.com: @@ -202,9 +176,8 @@ void gfs2_glock_put(struct gfs2_glock *gl) gfs2_glock_remove_from_lru(gl); spin_unlock(gl-gl_lockref.lock); - spin_lock_bucket(gl-gl_hash); - hlist_bl_del_rcu(gl-gl_list); -

Re: [Cluster-devel] [GFS2 PATCH 2/2] GFS2: Use resizable hash table for glocks

2015-08-24 Thread Andreas Gruenbacher
Bob, [sorry for the empty previous reply ...] 2015-07-09 20:25 GMT+02:00 Bob Peterson rpete...@redhat.com: @@ -1460,31 +1421,24 @@ static struct shrinker glock_shrinker = { * */ -static void examine_bucket(glock_examiner examiner, const struct gfs2_sbd *sdp, -

Re: [Cluster-devel] [GFS2 PATCH 2/2] GFS2: Use resizable hash table for glocks

2015-08-24 Thread Andreas Gruenbacher
Bob, 2015-07-09 20:25 GMT+02:00 Bob Peterson rpete...@redhat.com: This patch changes the glock hash table from a normal hash table to a resizable hash table, which scales better. This also simplifies a lot of code. --- fs/gfs2/glock.c | 282

[Cluster-devel] [RFC 10/11] selinux: Allow to invalidate an inode's security label

2015-08-20 Thread Andreas Gruenbacher
. Alternatively, we could add an inode operation called by inode_has_perm to revalidate the security label of the inode on each call, but inode_has_perm is called so frequently that the overhead seems excessive. Signed-off-by: Andreas Gruenbacher agrue...@redhat.com --- include/linux/lsm_hooks.h | 6

[Cluster-devel] [RFC 08/11] xattr: Pass inodes to xattr handlers instead of dentries

2015-08-20 Thread Andreas Gruenbacher
All remaining file systems that use the generic xattr_handler infrastructure only access dentry-d_inode and do nothing else with the dentry, so pass down the inode instead of the dentry to the xattr_handler operations. Signed-off-by: Andreas Gruenbacher agrue...@redhat.com --- fs/ext2/xattr.c

[Cluster-devel] [RFC 11/11] gfs2: Invalide security labels of inodes that go invalid

2015-08-20 Thread Andreas Gruenbacher
Invalide security labels of inodes when they go invalid. SELinux will reload the security.selinux xattr via iop-igetxattr on the next access. Signed-off-by: Andreas Gruenbacher agrue...@redhat.com --- fs/gfs2/glops.c | 2 ++ fs/gfs2/inode.c | 16 2 files changed, 14 insertions

[Cluster-devel] [RFC 09/11] vfs: Add igetxattr inode operation

2015-08-20 Thread Andreas Gruenbacher
-by: Andreas Gruenbacher agrue...@redhat.com --- Documentation/filesystems/Locking | 2 ++ Documentation/filesystems/vfs.txt | 4 fs/xattr.c| 12 +--- include/linux/fs.h| 1 + include/linux/xattr.h | 1 + 5 files changed, 17 insertions

[Cluster-devel] [RFC 05/11] xattr handlers: Some simplifications

2015-08-20 Thread Andreas Gruenbacher
We have access to struct xattr_handler inside the list/get/set operations now, so simplify some of the xattr code. Signed-off-by: Andreas Gruenbacher agrue...@redhat.com --- fs/9p/Makefile | 5 +--- fs/9p/acl.c| 51 - fs/9p/xattr.c

[Cluster-devel] [RFC 07/11] 9p: Stop using the generic xattr_handler infrastructure

2015-08-20 Thread Andreas Gruenbacher
only little additional code. Signed-off-by: Andreas Gruenbacher agrue...@redhat.com --- fs/9p/acl.c | 12 ++-- fs/9p/vfs_super.c | 5 ++--- fs/9p/xattr.c | 46 ++ fs/9p/xattr.h | 15 --- 4 files changed, 58 insertions

[Cluster-devel] [RFC 06/11] lib: Move strcmp_prefix into string.c

2015-08-20 Thread Andreas Gruenbacher
Move strcmp_prefix from fs/xattr.c into lib/string.h to make it available elsewhere; export it to modules. Signed-off-by: Andreas Gruenbacher agrue...@redhat.com --- fs/xattr.c | 11 --- include/linux/string.h | 1 + lib/string.c | 16 3 files

[Cluster-devel] [RFC 01/11] ubifs: Remove unused security.* xattr handler

2015-08-20 Thread Andreas Gruenbacher
. Remove the dead code. Signed-off-by: Andreas Gruenbacher agrue...@redhat.com Cc: Subodh Nijsure snijs...@grid-net.com --- fs/ubifs/super.c | 1 - fs/ubifs/ubifs.h | 1 - fs/ubifs/xattr.c | 40 3 files changed, 42 deletions(-) diff --git a/fs/ubifs/super.c b

[Cluster-devel] [RFC 04/11] xattr handlers: Pass handler to operations instead of flags

2015-08-20 Thread Andreas Gruenbacher
to the handler prefix. To allow that, pass a pointer to the handler to operations instead of the flags value alone. Signed-off-by: Andreas Gruenbacher agrue...@redhat.com --- fs/9p/acl.c | 12 +++- fs/9p/xattr_security.c | 6 -- fs/9p/xattr_trusted.c| 6

[Cluster-devel] [RFC 00/11] Inode security label invalidation

2015-08-20 Thread Andreas Gruenbacher
over time; when selinux rejects access, the file system never notices. To fix that, this patch queue adds a mechanism for file systems to invalidate inode security labels, and for selinux to revalidate them; this is similar to how the inode acl cache works. Thanks, Andreas Andreas Gruenbacher (11

[Cluster-devel] [RFC 03/11] 9p: Simplify the xattr handlers

2015-08-20 Thread Andreas Gruenbacher
the suffix though. There is no need to recompose the name in a temporary buffer. Signed-off-by: Andreas Gruenbacher agrue...@redhat.com --- fs/9p/xattr_security.c | 34 -- fs/9p/xattr_trusted.c | 34 -- fs/9p/xattr_user.c | 34

[Cluster-devel] [RFC 02/11] hfsplus: Remove unused xattr handler list operations

2015-08-20 Thread Andreas Gruenbacher
The list operations can never be called; they are even documented to be unused. Signed-off-by: Andreas Gruenbacher agrue...@redhat.com --- fs/hfsplus/xattr.c | 11 --- fs/hfsplus/xattr_security.c | 11 --- fs/hfsplus/xattr_trusted.c | 11 --- fs/hfsplus

Re: [Cluster-devel] [RFC 11/11] gfs2: Invalide security labels of inodes that go invalid

2015-08-21 Thread Andreas Gruenbacher
Christoph, thanks for your review. 2015-08-21 8:49 GMT+02:00 Christoph Hellwig h...@infradead.org: On Thu, Aug 20, 2015 at 08:19:58PM +0200, Andreas Gruenbacher wrote: Invalide security labels of inodes when they go invalid. SELinux will reload the security.selinux xattr via iop-igetxattr

[Cluster-devel] [PATCH v4 7/7] gfs2: Invalide security labels of inodes when they go invalid

2015-10-28 Thread Andreas Gruenbacher
reacquiring the glock. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Cc: Steven Whitehouse <swhit...@redhat.com> Cc: Bob Peterson <rpete...@redhat.com> Cc: cluster-devel@redhat.com --- fs/gfs2/glops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/gfs2/glops.c b/fs/

Re: [Cluster-devel] [PATCH 2/2] gfs2: Extended attribute readahead optimization

2015-11-12 Thread Andreas Gruenbacher
on some kinds of block devices. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/gfs2/meta_io.c | 81 ++- 1 file changed, 63 insertions(+), 18 deletions(-) diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c index 0f24828..e

Re: [Cluster-devel] [PATCH 2/2] gfs2: Extended attribute readahead optimization

2015-11-13 Thread Andreas Gruenbacher
On Thu, Nov 12, 2015 at 9:33 PM, Steven Whitehouse wrote: > That looks good to me, and I assume that it should be faster too? I did some tests with a directory tree with 3439 directories and 51556 files in it. In that tree, 47313 or 86% of the 54995 files and directories

Re: [Cluster-devel] [PATCH 2/2] gfs2: Extended attribute readahead optimization

2015-11-12 Thread Andreas Gruenbacher
On Thu, Nov 12, 2015 at 2:44 PM, Steven Whitehouse <swhit...@redhat.com> wrote: > Hi, > > > On 01/11/15 19:02, Andreas Gruenbacher wrote: >> >> Instead of submitting separate bio for the inode and its extended >> attributes, submit a single bio for both w

[Cluster-devel] [PATCH 2/2] gfs2: Extended attribute readahead optimization

2015-11-01 Thread Andreas Gruenbacher
Instead of submitting separate bio for the inode and its extended attributes, submit a single bio for both when possible. The entire request becomes a normal read, not a readahead. To keep track of the buffer heads that make up the bio, we allocate temporary buffer head arrays: in the endio

[Cluster-devel] [PATCH v5 7/7] gfs2: Invalide security labels of inodes when they go invalid

2015-11-01 Thread Andreas Gruenbacher
reacquiring the glock. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Acked-by: Bob Peterson <rpete...@redhat.com> Acked-by: Steven Whitehouse <swhit...@redhat.com> Cc: cluster-devel@redhat.com --- fs/gfs2/glops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/gfs2

Re: [Cluster-devel] [PATCH 1/2] gfs2: Extended attribute readahead

2015-11-03 Thread Andreas Gruenbacher
Bob and Steve, On Tue, Nov 3, 2015 at 8:02 PM, Steven Whitehouse wrote: >> Most of this looks good. However, two comments: >> >> 1. I don't like adding a new u16 to the gfs2_inode. I've been working to >> reduce the size of gfs2's inodes lately, so I'd rather see this >>

[Cluster-devel] [PATCH] gfs2: A minor sbstats cleanup

2015-08-26 Thread Andreas Gruenbacher
It seems cleaner to avoid the temporary value here. Signed-off-by: Andreas Gruenbacher agrue...@redhat.com --- fs/gfs2/glock.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 9b6e1a0..f6f51c6 100644 --- a/fs/gfs2/glock.c

[Cluster-devel] [PATCH] gfs2: Fix a typo in a comment

2015-08-26 Thread Andreas Gruenbacher
Signed-off-by: Andreas Gruenbacher agrue...@redhat.com --- fs/gfs2/lock_dlm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c index 641383a..28f3286 100644 --- a/fs/gfs2/lock_dlm.c +++ b/fs/gfs2/lock_dlm.c @@ -31,7 +31,7 @@ extern struct

Re: [Cluster-devel] [PATCH] gfs2: Make statistics unsigned, suitable for use with do_div()

2015-08-26 Thread Andreas Gruenbacher
Ben, [sorry about the previous botched reply, I didn't reveive your original message via cluster-devel for some reason and bouncing it through attachment / mutt into gmail somehow messed up your address.] 2015-08-26 2:21 GMT+02:00 Ben Hutchings andreas.gruenbac...@gmail.com: None of these

[Cluster-devel] [PATCH] gfs2: Incomplete sbstat statistics?

2015-08-26 Thread Andreas Gruenbacher
In gfs2_sbstats_seq_show, we are using the first column for the cpu number. We are only iterating over gltype times stype values so we end up not reporting the last statistic, journal queue. I assume this is a bug? Signed-off-by: Andreas Gruenbacher agrue...@redhat.com --- fs/gfs2/glock.c | 4

Re: [Cluster-devel] [PATCH] gfs2: Make statistics unsigned, suitable for use with do_div()

2015-08-26 Thread Andreas Gruenbacher
Ben, 2015-08-26 2:21 GMT+02:00 Ben Hutchings andreas.gruenbac...@gmail.com: None of these statistics can meaningfully be negative, and the numerator for do_div() must have the type u64. The generic implementation of do_div() used on some 32-bit architectures asserts that, resulting in a

Re: [Cluster-devel] [PATCH 4/6] gfs2: Make statistics unsigned, suitable for use with do_div()

2015-09-03 Thread Andreas Gruenbacher
Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com>

Re: [Cluster-devel] [PATCH 3/6] GFS2: Use resizable hash table for glocks

2015-09-03 Thread Andreas Gruenbacher
Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com>

Re: [Cluster-devel] [PATCH 2/6] GFS2: Move glock superblock pointer to field gl_name

2015-09-03 Thread Andreas Gruenbacher
Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com>

Re: [Cluster-devel] [PATCH 0/6] GFS2: Pre-pull patch posting (merge window)

2015-09-03 Thread Andreas Gruenbacher
Bob, 2015-09-02 22:02 GMT+02:00 Bob Peterson : > Here is a list of patches we've accumulated for GFS2 for the current upstream > merge window. There are only six patches this time: a couple of code > cleanups from Andreas, a change from signed to unsigned for glock

[Cluster-devel] [PATCH] gfs2: Remove gl_spin define

2015-09-09 Thread Andreas Gruenbacher
Commit e66cf161 replaced the gl_spin spinlock in struct gfs2_glock with a gl_lockref lockref and defined gl_spin as gl_lockref.lock (the spinlock in gl_lockref). Remove that define to make the references to gl_lockref.lock more obvious. Signed-off-by: Andreas Gruenbacher <andreas.gruen

[Cluster-devel] [PATCH 2/2] gfs2_edit: Include dirent.de_rahead in directory listings

2015-09-09 Thread Andreas Gruenbacher
When dumping a directory, for directory each entry, also print how many blocks of metadata can be read ahead when reading in the inode the entry points at. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- gfs2/edit/extended.c | 5 +++-- 1 file changed, 3 insertions(+), 2 del

[Cluster-devel] [PATCH 1/2] libgfs2: Add support for dirent.de_rahead

2015-09-09 Thread Andreas Gruenbacher
This field indicates how many blocks of metadata can be read ahead when reading in the inode a directory entry points at. Signed-off-by: Andreas Gruenbacher <andreas.gruenbac...@gmail.com> --- gfs2/libgfs2/meta.c | 1 + gfs2/libgfs2/ondisk.c | 2 ++ 2 files changed, 3 insertions(+) diff

Re: [Cluster-devel] [PATCH 2/2] gfs2_edit: Include dirent.de_rahead in directory listings

2015-09-10 Thread Andreas Gruenbacher
2015-09-09 18:27 GMT+02:00 Andrew Price : > It would be better to use %u for an unsigned int. We don't have > __attribute__((format(printf...))) on print_gfs2 yet but it would catch > that. I've tried adding the printf format attribute; it's quite a mess. A common pattern is

[Cluster-devel] [PATCH 1/2] gfs2: Fix printf format errors on x86

2015-09-10 Thread Andreas Gruenbacher
Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- gfs2/fsck/metawalk.c | 2 +- gfs2/mkfs/main_grow.c | 5 +++-- gfs2/mkfs/main_mkfs.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gfs2/fsck/metawalk.c b/gfs2/fsck/metawalk.c index 333bec6..9923d94

Re: [Cluster-devel] [PATCH 2/2] gfs2_edit: Include dirent.de_rahead in directory listings

2015-09-11 Thread Andreas Gruenbacher
2015-09-11 12:45 GMT+02:00 Andrew Price : > Yes, I think ideally we should have a set of userspace structures to keep > things separate. Building gfs2-utils currently also depends on /usr/include/linux/gfs2_ondisk.h, so when building on an old system, some features will be

[Cluster-devel] [PATCH v2 2/2] gfs2: Invalide security labels of inodes that go invalid

2015-10-04 Thread Andreas Gruenbacher
reacquiring the glock. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Cc: Steven Whitehouse <swhit...@redhat.com> Cc: Bob Peterson <rpete...@redhat.com> Cc: cluster-devel@redhat.com --- fs/gfs2/glops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/gfs2/glops.c b/fs/

Re: [Cluster-devel] [PATCH] gfs2: clear journal live bit in gfs2_log_flush

2015-12-09 Thread Andreas Gruenbacher
Ben, the fix is looking good and I can no longer trigger this bug, thanks. Andreas

Re: [Cluster-devel] [PATCH] GFS2: Add a next-resource-group pointer to resource groups

2016-01-12 Thread Andreas Gruenbacher
On Tue, Jan 12, 2016 at 2:12 PM, Andrew Price <anpr...@redhat.com> wrote: > On 12/01/16 12:39, Andreas Gruenbacher wrote: >> >> On Tue, Jan 12, 2016 at 12:39 PM, Andrew Price <anpr...@redhat.com> wrote: >>> >>> Add a new rg_skip field to struct gfs2_rgr

Re: [Cluster-devel] [PATCH] GFS2: Add a next-resource-group pointer to resource groups

2016-01-12 Thread Andreas Gruenbacher
On Tue, Jan 12, 2016 at 12:39 PM, Andrew Price wrote: > Add a new rg_skip field to struct gfs2_rgrp, replacing __pad. The > rg_skip field has the following meaning: > > - If rg_skip is zero, it is considered unset and not useful. > - If rg_skip is non-zero, its value will be

Re: [Cluster-devel] [GFS2 PATCH] GFS2: Use local iopen glock holder in gfs2_evict_inode

2016-06-14 Thread Andreas Gruenbacher
gfs2_glock_dq_wait(>i_iopen_gh); > + if (io_gh.gh_gl) { > + if (test_bit(HIF_HOLDER, _gh.gh_iflags)) { > + io_gh.gh_flags |= GL_NOCACHE; > + gfs2_glock_dq_wait(_gh); > } > - gfs2_holder_uninit(>i_iopen_gh); > + gfs2_holder_uninit(_gh); > } > gfs2_glock_dq_uninit(); > if (error && error != GLR_TRYFAILED && error != -EROFS) > Acked-by: Andreas Gruenbacher <agrue...@redhat.com>

[Cluster-devel] [PATCH] gfs2: Lock holder cleanup

2016-06-15 Thread Andreas Gruenbacher
a separate flag. Recognize initialized holders by their non-NULL glock (gfs2_holder_initialized). Don't zero out holder objects which are immeditiately initialized via gfs2_holder_init or indirectly via gfs2_glock_nq_init. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/gfs2/de

[Cluster-devel] [PATCH] gfs2: Initialize iopen glock holder for new inodes

2016-06-17 Thread Andreas Gruenbacher
quot;gfs2: Fix gfs2_lookup_by_inum lock inversion" made gfs2_inode_lookup fail in this way more often, and we started to see this kind of failure. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/gfs2/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/gfs2/main.c b/fs/gfs2/main

[Cluster-devel] [PATCH v2] gfs2: Lock holder cleanup

2016-06-17 Thread Andreas Gruenbacher
a separate flag. Recognize initialized holders by their non-NULL glock (gfs2_holder_initialized). Don't zero out holder objects which are immeditiately initialized via gfs2_holder_init or gfs2_glock_nq_init. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/gfs2/dentry.c | 2 +- f

Re: [Cluster-devel] DLM Shutdown

2016-02-10 Thread Andreas Gruenbacher
On Wed, Feb 10, 2016 at 6:38 PM, David Teigland <teigl...@redhat.com> wrote: > On Wed, Feb 10, 2016 at 02:33:49AM +0100, Andreas Gruenbacher wrote: >> never actively releases existing lockspaces. This means that as soon >> as any application creates the default

Re: [Cluster-devel] DLM Shutdown

2016-02-10 Thread Andreas Gruenbacher
On Wed, Feb 10, 2016 at 9:18 PM, David Teigland <teigl...@redhat.com> wrote: > On Wed, Feb 10, 2016 at 08:48:12PM +0100, Andreas Gruenbacher wrote: >> When a shutdown is requested, shouldn't dlm_controld really release >> lockspaces in a similar way as well? > > You co

Re: [Cluster-devel] DLM Shutdown

2016-02-10 Thread Andreas Gruenbacher
On Wed, Feb 10, 2016 at 10:16 PM, David Teigland wrote: > OK, yes, but we've wandered into the weeds here. dlm_controld isn't > involved in lockspace lifetimes, that's the application/libdlm side. > The question is what behavior the program creating/removing the lockspace >

[Cluster-devel] DLM Shutdown

2016-02-09 Thread Andreas Gruenbacher
rold which depends on corosync. dlm_controld needs some sort of membership management service and so I understand that it uses corosync, but from a testing perspective, having something simple would still be nice. So I started writing FakeDLM, a toy dlm_controld substitute (https://github.com/andreas-g

Re: [Cluster-devel] [DLM PATCH 3/6] DLM: Make consistent error path

2016-02-11 Thread Andreas Gruenbacher
Bob, On Thu, Feb 11, 2016 at 6:59 PM, Bob Peterson wrote: > - Original Message - >> > +out_err: >> > + sock_release(sock); >> > + sock = NULL; >> > + con->sock = NULL; >> >> Consolidating the error paths makes sense, but con->sock shouldn't be >>

Re: [Cluster-devel] [DLM PATCH 2/6] DLM: Call original error report when socket is NULL

2016-02-11 Thread Andreas Gruenbacher
<rpete...@redhat.com> Reviewed-by: Andreas Gruenbacher <agrue...@redhat.com>

Re: [Cluster-devel] [DLM PATCH 5/6] DLM: Add locking to protect save callback assignments

2016-02-11 Thread Andreas Gruenbacher
_print("Could not set SCTP NODELAY error %d\n", result); > > + write_lock_bh(>sk->sk_callback_lock); > /* Init con struct */ > sock->sk->sk_user_data = con; > con->sock = sock; > @@ -1281,6 +1296,8 @@ static int sctp_listen_for_all(void) > con->rx_action = sctp_accept_from_sock; > con->connect_action = sctp_connect_to_sock; > > + write_unlock_bh(>sk->sk_callback_lock); > + > /* Bind to all addresses. */ > if (sctp_bind_addrs(con, dlm_config.ci_tcp_port)) > goto create_delsock; > -- > 2.5.0 > Reviewed-by: Andreas Gruenbacher <agrue...@redhat.com>

Re: [Cluster-devel] [DLM PATCH 0/6] Misc DLM Improvements Regarding Socket Errors

2016-02-11 Thread Andreas Gruenbacher
On Wed, Feb 10, 2016 at 7:55 PM, Bob Peterson wrote: > I've been doing a bunch of recovery testing with DLM and discovered some > issues. This collection of 6 patches addresses those issues. Some of them > are of my own making, introduced by the recent patches that made DLM >

Re: [Cluster-devel] [DLM PATCH 6/6][try #2] DLM: save / restore all socket callbacks

2016-02-11 Thread Andreas Gruenbacher
saving off the original error report > callback before setting its own, but it never restored it. Instead, > we should be saving off all four socket callbacks before changing > them, and then restore them once we're done. > > Signed-off-by: Bob Peterson <rpete...@redhat.com> Reviewed-by: Andreas Gruenbacher <agrue...@redhat.com>

Re: [Cluster-devel] [DLM PATCH 4/6] DLM: Eliminate useless goto

2016-02-11 Thread Andreas Gruenbacher
On Wed, Feb 10, 2016 at 7:55 PM, Bob Peterson wrote: > This patch simply removes a goto from function sctp_listen_for_all. > The end result is the same, but makes the code more readable. > > Signed-off-by: Bob Peterson > --- > fs/dlm/lowcomms.c | 3 +--

Re: [Cluster-devel] [DLM PATCH 3/6] DLM: Make consistent error path through tcp_create_listen_sock

2016-02-11 Thread Andreas Gruenbacher
On Wed, Feb 10, 2016 at 7:55 PM, Bob Peterson wrote: > Function tcp_create_listen_sock has two error paths. One of them > was setting con->sock to NULL. The other was not. This patch changes > it to be consistent and do the same thing for both error paths. > > Signed-off-by:

Re: [Cluster-devel] [PATCH v2] glocktop: Fix a tight loop under nohup

2016-03-01 Thread Andreas Gruenbacher
On Tue, Mar 1, 2016 at 8:43 PM, Andrew Price wrote: > When glocktop is run under nohup, /dev/null is redirected to stdin, > which flags up EOF and causes the file descriptor to always be in a > ready state when select()ed. This causes select() to return immediately > instead

[Cluster-devel] [PATCH] gfs2: Switch to generic xattr handlers

2016-04-12 Thread Andreas Gruenbacher
be removed and replaced with the generic inode operations. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/gfs2/inode.c | 79 fs/gfs2/xattr.c | 112 fs/posix_acl.c

Re: [Cluster-devel] [PATCH 0/7] Allow lock dropping before waiting on inodes being freed

2016-05-16 Thread Andreas Gruenbacher
On Fri, May 13, 2016 at 7:42 PM, Andreas Gruenbacher <agrue...@redhat.com> wrote: > This patch set my Bob and me avoids a deadlock in gfs2 when an inode is being > freed: normally, when find_inode finds an inode in I_FREEING or I_WILL_FREE > state, it waits for the inode to

[Cluster-devel] [PATCH v2] gfs2: Switch to generic xattr handlers

2016-05-12 Thread Andreas Gruenbacher
fs2_create_inode -> posix_acl_create and gfs2_setattr -> posix_acl_chmod. gfs2_set_acl: From gfs2_setattr -> posix_acl_chmod. Signed-off-by: Al Viro <v...@zeniv.linux.org.uk> Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/gfs2/acl.c | 58

[Cluster-devel] [PATCH 2/7] Revert "GFS2: Don't filter out I_FREEING inodes anymore"

2016-05-13 Thread Andreas Gruenbacher
From: Bob Peterson This reverts commit ff34245d524a898eee6e013eb1ec165095277148. Signed-off-by: Bob Peterson --- fs/gfs2/export.c | 2 +- fs/gfs2/glock.c | 2 +- fs/gfs2/inode.c | 58 +---

[Cluster-devel] [PATCH 5/7] vfs: Introduce prepare_wait_on_freeing_inode

2016-05-13 Thread Andreas Gruenbacher
, filesystems can use find_inode_nowait. When an inode that is being freed is found, they can prepare to wait for the inode to go away inside find_inode_nowait, then drop the conflicting lock and wait outside of find_inode_nowait. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/i

[Cluster-devel] [PATCH 6/7] GFS2: Use non-blocking wait in gfs2_iget

2016-05-13 Thread Andreas Gruenbacher
Change gfs2_iget to use non-blocking lookups internally. This will be used to prevent glock deadlocks. (Requires exporting __iget from fs/inode.c.) Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/gfs2/inode.c | 104 --

[Cluster-devel] [PATCH 4/7] GFS2: No need for non-blocking gfs2_ilookup in delete_work_func

2016-05-13 Thread Andreas Gruenbacher
non-blocking callers of gfs2_ilookup are left, and the non-block parameter of gfs2_ilookup can be removed. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/gfs2/export.c | 2 +- fs/gfs2/glock.c | 6 +++--- fs/gfs2/inode.c | 4 ++-- fs/gfs2/inode.h | 2 +- 4 files chan

[Cluster-devel] [PATCH 3/7] GFS2: Remove superfluous assignment

2016-05-13 Thread Andreas Gruenbacher
This patch removes an unneeded assignment in gfs2_inode_lookup: gfs2_iget already initializes GFS2_I(inode)->i_no_addr. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/gfs2/inode.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/gfs2/inode.c b/fs/gfs2/inod

[Cluster-devel] [PATCH 7/7] GFS2: Prevent deadlock in gfs2_lookup_by_inum

2016-05-13 Thread Andreas Gruenbacher
-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/gfs2/dir.c| 2 +- fs/gfs2/inode.c | 42 +- fs/gfs2/inode.h | 2 +- fs/gfs2/ops_fstype.c | 2 +- 4 files changed, 28 insertions(+), 20 deletions(-) diff --git a/fs/gfs2/dir.c b/fs/gfs2

[Cluster-devel] [PATCH 0/7] Allow lock dropping before waiting on inodes being freed

2016-05-13 Thread Andreas Gruenbacher
and wait for an arbitrary amount of time before retrying the lookup instead as well, but waiting for the actual event (i.e., the inode being freed to likely have disappeared) makes more sense. Thanks, Andreas Andreas Gruenbacher (5): GFS2: Remove superfluous assignment GFS2: No need for non

[Cluster-devel] [PATCH 1/7] Revert "GFS2: Eliminate parameter non_block on gfs2_inode_lookup"

2016-05-13 Thread Andreas Gruenbacher
From: Bob Peterson This reverts commit 73b462d2808d7cbca4d7886cf6aaed850640e6cd. Signed-off-by: Bob Peterson --- fs/gfs2/dir.c| 2 +- fs/gfs2/inode.c | 5 +++-- fs/gfs2/inode.h | 3 ++- fs/gfs2/ops_fstype.c | 2 +- 4 files changed, 7

[Cluster-devel] [PATCH 4/8] ceph: Get rid of d_find_alias in ceph_set_acl

2016-04-13 Thread Andreas Gruenbacher
Create a variant of ceph_setattr that takes an inode instead of a dentry. Change __ceph_setxattr (and also __ceph_removexattr) to take an inode instead of a dentry. Use those in ceph_set_acl so that we no longer need a dentry there. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.

[Cluster-devel] [PATCH 2/8] cifs: Check for equality with ACL_TYPE_ACCESS and ACL_TYPE_DEFAULT

2016-04-13 Thread Andreas Gruenbacher
The two values ACL_TYPE_ACCESS and ACL_TYPE_DEFAULT are meant to be enumerations, not bits in a bit mask. Use '==' instead of '&' to check for these values. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/cifs/cifssmb.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[Cluster-devel] [PATCH 1/8] cifs: Fix xattr name checks

2016-04-13 Thread Andreas Gruenbacher
Use strcmp(str, name) instead of strncmp(str, name, strlen(name)) for checking if str and name are the same (as opposed to name being a prefix of str) in the gexattr and setxattr inode operations. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/cifs/xattr.

[Cluster-devel] [PATCH 4/8] ceph: Get rid of d_find_alias in ceph_set_acl

2016-04-13 Thread Andreas Gruenbacher
Create a variant of ceph_setattr that takes an inode instead of a dentry. Change __ceph_setxattr (and also __ceph_removexattr) to take an inode instead of a dentry. Use those in ceph_set_acl so that we no longer need a dentry there. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.

[Cluster-devel] [PATCH 5/8] ceph: Switch to generic xattr handlers

2016-04-13 Thread Andreas Gruenbacher
set,remove}xattr can be replaced with the generic iops. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Signed-off-by: "Yan, Zheng" <z...@redhat.com> --- fs/ceph/dir.c | 7 +++--- fs/ceph/inode.c | 13 ++-- fs/ceph/super.h

[Cluster-devel] [PATCH 2/8] cifs: Check for equality with ACL_TYPE_ACCESS and ACL_TYPE_DEFAULT

2016-04-13 Thread Andreas Gruenbacher
The two values ACL_TYPE_ACCESS and ACL_TYPE_DEFAULT are meant to be enumerations, not bits in a bit mask. Use '==' instead of '&' to check for these values. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/cifs/cifssmb.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[Cluster-devel] [PATCH 1/8] cifs: Fix xattr name checks

2016-04-13 Thread Andreas Gruenbacher
Use strcmp(str, name) instead of strncmp(str, name, strlen(name)) for checking if str and name are the same (as opposed to name being a prefix of str) in the gexattr and setxattr inode operations. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/cifs/xattr.

[Cluster-devel] [PATCH 7/8] posix acls: Export xattr_handler functions

2016-04-13 Thread Andreas Gruenbacher
These functions are useful in filesystems like gfs2 which require pre-/postamble code around xattr operations. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Reviewed-by: Bob Peterson <rpete...@redhat.com> --- fs/posix_acl.c | 9 ++--- i

Re: [Cluster-devel] [PATCH] xattr: Export xattr_resolve_name

2016-04-13 Thread Andreas Gruenbacher
On Wed, Apr 13, 2016 at 8:20 PM, Al Viro <v...@zeniv.linux.org.uk> wrote: > On Wed, Apr 13, 2016 at 05:40:34PM +0200, Andreas Gruenbacher wrote: >> Export xattr_resolve_name and make it easier to use by filesystems. >> Use it to remove reiserfs's own copy of the same function

[Cluster-devel] [PATCH 6/8] ceph: kill __ceph_removexattr()

2016-04-13 Thread Andreas Gruenbacher
From: "Yan, Zheng" when removing a xattr, generic_removexattr() calls __ceph_setxattr() with NULL value and XATTR_REPLACE flag. __ceph_removexattr() is not used any more. Signed-off-by: "Yan, Zheng" --- fs/ceph/xattr.c | 126

[Cluster-devel] [PATCH 3/8] cifs: Fix removexattr for os2.* xattrs

2016-04-13 Thread Andreas Gruenbacher
If cifs_removexattr finds a "user." or "os2." xattr name prefix, it skips 5 bytes, one byte too many for "os2.". Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/cifs/xattr.c | 26 +- 1 file changed, 17 insertions(+),

[Cluster-devel] [PATCH 5/8] ceph: Switch to generic xattr handlers

2016-04-13 Thread Andreas Gruenbacher
set,remove}xattr can be replaced with the generic iops. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Signed-off-by: "Yan, Zheng" <z...@redhat.com> --- fs/ceph/dir.c | 7 +++--- fs/ceph/inode.c | 13 ++-- fs/ceph/super.h

[Cluster-devel] [PATCH 7/8] posix acls: Export xattr_handler functions

2016-04-13 Thread Andreas Gruenbacher
These functions are useful in filesystems like gfs2 which require pre-/postamble code around xattr operations. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Reviewed-by: Bob Peterson <rpete...@redhat.com> --- fs/posix_acl.c | 9 ++--- i

Re: [Cluster-devel] [PATCH] xattr: Export xattr_resolve_name

2016-04-13 Thread Andreas Gruenbacher
On Wed, Apr 13, 2016 at 8:20 PM, Al Viro <v...@zeniv.linux.org.uk> wrote: > On Wed, Apr 13, 2016 at 05:40:34PM +0200, Andreas Gruenbacher wrote: >> Export xattr_resolve_name and make it easier to use by filesystems. >> Use it to remove reiserfs's own copy of the same function

[Cluster-devel] [PATCH 6/8] ceph: kill __ceph_removexattr()

2016-04-13 Thread Andreas Gruenbacher
From: "Yan, Zheng" when removing a xattr, generic_removexattr() calls __ceph_setxattr() with NULL value and XATTR_REPLACE flag. __ceph_removexattr() is not used any more. Signed-off-by: "Yan, Zheng" --- fs/ceph/xattr.c | 126

[Cluster-devel] [PATCH 8/8] gfs2: Switch to generic xattr handlers

2016-04-13 Thread Andreas Gruenbacher
be removed and replaced with the generic inode operations. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Reviewed-by: Bob Peterson <rpete...@redhat.com> --- fs/gfs2/inode.c | 78 +--- fs/gfs2/x

[Cluster-devel] [PATCH 3/8] cifs: Fix removexattr for os2.* xattrs

2016-04-13 Thread Andreas Gruenbacher
If cifs_removexattr finds a "user." or "os2." xattr name prefix, it skips 5 bytes, one byte too many for "os2.". Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> --- fs/cifs/xattr.c | 26 +- 1 file changed, 17 insertions(+),

Re: [Cluster-devel] [GFS2 PATCH 0/7] Fix glock deadlocks with deleted inodes

2016-05-24 Thread Andreas Gruenbacher
On Tue, May 24, 2016 at 9:12 PM, Bob Peterson wrote: > I'm sending this to linux-fsdevel because one of the patches affects vfs. FWIW, except for Bob's new cover letter, this is a repost of the following patch set from May 13 -- which nobody has commented on so far:

Re: [Cluster-devel] [PATCH 1/1 linux-next] GFS2: use BIT() macro

2016-07-26 Thread Andreas Gruenbacher
Fabian, On Sun, Jul 24, 2016 at 4:24 PM, Fabian Frederick wrote: > Replace 1 << value shift by more explicit BIT() macro > > Also fixes two bare unsigned definitions: > > WARNING: Prefer 'unsigned int' to bare use of 'unsigned' > + unsigned hsize = BIT(ip->i_depth);

Re: [Cluster-devel] [PATCH] gfs2: Add missing rcu locking for glock lookup

2017-02-22 Thread Andreas Gruenbacher
On Wed, Feb 22, 2017 at 4:13 PM, Steven Whitehouse wrote: > Hi, > > Looks good, but can we fix that "retry for 100 times" loop too at the same > time? There does appear to be an rhashtable API function that does what we > need there, The rhashtable cleanup which I've posted

Re: [Cluster-devel] [PATCH] gfs2: Add missing rcu locking for glock lookup

2017-02-22 Thread Andreas Gruenbacher
On Wed, Feb 22, 2017 at 4:26 PM, Andreas Gruenbacher <agrue...@redhat.com> wrote: > On Wed, Feb 22, 2017 at 4:13 PM, Steven Whitehouse <swhit...@redhat.com> > wrote: >> Hi, >> >> Looks good, but can we fix that "retry for 100 times" l

[Cluster-devel] [PATCH 0/2] GFS2 rhashtable cleanup

2017-02-22 Thread Andreas Gruenbacher
code by using rhashtable_lookup_get_insert_fast. Andreas Gruenbacher (2): rhashtable: Add rhashtable_lookup_get_insert_fast gfs2: Switch to rhashtable_lookup_get_insert_fast fs/gfs2/glock.c| 45 + include/linux/rhashtable.h | 22

[Cluster-devel] [PATCH 1/2] rhashtable: Add rhashtable_lookup_get_insert_fast

2017-02-22 Thread Andreas Gruenbacher
Add rhashtable_lookup_get_insert_fast for fixed keys, similar to rhashtable_lookup_get_insert_key for explicit keys. Signed-off-by: Andreas Gruenbacher <agrue...@redhat.com> Cc: Pablo Neira Ayuso <pa...@netfilter.org> Cc: Herbert Xu <herb...@gondor.apana.org.au> Cc: Thomas G

Re: [Cluster-devel] [PATCH v3] GFS2: Add a next-resource-group pointer to resource groups

2017-02-15 Thread Andreas Gruenbacher
On Tue, Feb 14, 2017 at 11:32 AM, Steven Whitehouse wrote: > Hi, > > > On 13/02/17 17:59, Andrew Price wrote: >> >> Add a new rg_skip field to struct gfs2_rgrp, replacing __pad. The >> rg_skip field has the following meaning: >> >> - If rg_skip is zero, it is considered unset

Re: [Cluster-devel] [PATCH] GFS2: Add a next-resource-group pointer to resource groups

2017-02-15 Thread Andreas Gruenbacher
On Tue, Jan 12, 2016 at 4:23 PM, Andrew Price <anpr...@redhat.com> wrote: > On 12/01/16 13:30, Andreas Gruenbacher wrote: >> >> Is it guaranteed that the kernel will never set the new rg_skip field >> if it hasn't verified that the next resour

  1   2   3   4   5   6   7   8   9   10   >