cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] dlm: make dlm_posix_lock comply with posix file lock semanteme
@ 2015-10-14 15:20 Eric Ren
  2015-10-14 15:20 ` [Cluster-devel] [PATCH] " Eric Ren
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Ren @ 2015-10-14 15:20 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi David and all,

After using this patch, deadlock test for posix file lock, both on local and
on cluster mode for ocfs2, acts the same now as other local fs like ext4.

But, I have no gfs2 environment to verify if this issue would happen and can
be fixed by this patch. Hope anyone working on gfs2 could comfirm on it with
me.

Thanks,
Eric



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Cluster-devel] [PATCH] dlm: make dlm_posix_lock comply with posix file lock semanteme
  2015-10-14 15:20 [Cluster-devel] dlm: make dlm_posix_lock comply with posix file lock semanteme Eric Ren
@ 2015-10-14 15:20 ` Eric Ren
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Ren @ 2015-10-14 15:20 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Posix file lock semanteme expects that waiting processes that request
a conflicting lock on file can be interrputed by signals like SIGALRM.
But, dlm_posix_lock puts waiting process into "Disk Sleep" status.
This failed ocfs2 test suits for posix file lock.

Replacing wait_event_killable with wait_event_interruptible can fix
this issue.

Signed-off-by: Eric Ren <zren@suse.com>
Acked-by: David Teigland <teigland@redhat.com>
---
 fs/dlm/plock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c
index 5532f09..88f1036 100644
--- a/fs/dlm/plock.c
+++ b/fs/dlm/plock.c
@@ -145,7 +145,7 @@ int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file,
 	send_op(op);
 
 	if (xop->callback == NULL) {
-		rv = wait_event_killable(recv_wq, (op->done != 0));
+		rv = wait_event_interruptible(recv_wq, (op->done != 0));
 		if (rv == -ERESTARTSYS) {
 			log_debug(ls, "dlm_posix_lock: wait killed %llx",
 				  (unsigned long long)number);
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-14 15:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-14 15:20 [Cluster-devel] dlm: make dlm_posix_lock comply with posix file lock semanteme Eric Ren
2015-10-14 15:20 ` [Cluster-devel] [PATCH] " Eric Ren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).