[Ocfs2-devel] [PATCH] dlm: make dlm_posix_lock comply with posix file lock semanteme

2015-10-14 Thread Eric Ren
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 
Acked-by: David Teigland 
---
 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


___
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel


[Ocfs2-devel] [PATCH] dlm: make dlm_posix_lock comply with posix file lock semanteme

2015-10-14 Thread Eric Ren
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 
Acked-by: David Teigland 
---
 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


___
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel