All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Ren <zren@suse.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] dlm: make dlm_posix_lock comply with posix file lock semanteme
Date: Wed, 14 Oct 2015 23:20:47 +0800	[thread overview]
Message-ID: <1444836047-8020-2-git-send-email-zren@suse.com> (raw)
In-Reply-To: <1444836047-8020-1-git-send-email-zren@suse.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

WARNING: multiple messages have this Message-ID (diff)
From: Eric Ren <zren@suse.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] dlm: make dlm_posix_lock comply with posix file lock semanteme
Date: Wed, 14 Oct 2015 23:20:47 +0800	[thread overview]
Message-ID: <1444836047-8020-2-git-send-email-zren@suse.com> (raw)
In-Reply-To: <1444836047-8020-1-git-send-email-zren@suse.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



  reply	other threads:[~2015-10-14 15:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14 15:20 [Ocfs2-devel] dlm: make dlm_posix_lock comply with posix file lock semanteme Eric Ren
2015-10-14 15:20 ` [Cluster-devel] " Eric Ren
2015-10-14 15:20 ` Eric Ren [this message]
2015-10-14 15:20   ` [Cluster-devel] [PATCH] " Eric Ren
2015-10-14 15:28 [Ocfs2-devel] " Eric Ren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1444836047-8020-2-git-send-email-zren@suse.com \
    --to=zren@suse.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.