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

2016-05-13 Thread Andreas Gruenbacher
In delete_work_func, we are guaranteed not to be holding the glock of the inode we are looking up. If the inode we are looking for is being freed, the lookup is free to block until the inode is gone. (Freeing the inode takes the glock, so we must not already be holding it.) With that, no more

[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 --- fs/gfs2/inode.c | 104

[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
Add function prepare_wait_on_freeing_inode: during an inode lookup, freeing an inode can require taking a lock that the filesystem already holds. The lock must be dropped before we can wait for the inode to go away; waiting inside find_inode / find_inode_fast would deadlock. In that case,

[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 7/7] GFS2: Prevent deadlock in gfs2_lookup_by_inum

2016-05-13 Thread Andreas Gruenbacher
In gfs2_lookup_by_inum, we must take the glock of a presumed inode before we can determine if the block indeed still contains an inode, then look up the inode. When a lookup finds an inode that is being freed, it usually waits until that inodes has gone before returning. However, freeing the

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

2016-05-13 Thread Andreas Gruenbacher
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 go away before returning (__wait_on_freeing_inode). Freeing an inode on gfs2 requires taking the inode's

[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 --- fs/gfs2/inode.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index

Re: [Cluster-devel] inconsistent dlm_new_lockspace LVB_LEN size from ocfs2 user-space tool and ocfs2 kernel module

2016-05-13 Thread David Teigland
On Fri, May 13, 2016 at 02:36:25AM -0600, Gang He wrote: > Here is a inconsistent LVB_LEN size problem when create a new lockspace > from user-space tool (e.g. fsck.ocfs2) and kernel module (e.g. > ocfs2/stack_user.c). > From the userspace tool, the LVB size is DLM_USER_LVB_LEN (32 bytes, >

Re: [Cluster-devel] [DLM PATCH] dlm_controld: handle the case of network transient disconnection

2016-05-13 Thread David Teigland
On Fri, May 13, 2016 at 01:45:47PM +0800, Eric Ren wrote: > >the cluster. Neither option is good. In the past we decided to let the > >cluster sit in this state so an admin could choose which nodes to remove. > >Do you prefer the alternative of kicking nodes in this case (with somewhat >

[Cluster-devel] inconsistent dlm_new_lockspace LVB_LEN size from ocfs2 user-space tool and ocfs2 kernel module

2016-05-13 Thread Gang He
Hello Guys, Here is a inconsistent LVB_LEN size problem when create a new lockspace from user-space tool (e.g. fsck.ocfs2) and kernel module (e.g. ocfs2/stack_user.c). >From the userspace tool, the LVB size is DLM_USER_LVB_LEN (32 bytes, defined >in /include/linux/dlm_device.h) >From the kernel