From: Miklos Szeredi <miklos@szeredi.hu>
To: akpm@linux-foundation.org
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Trond Myklebust <trond.myklebust@fys.uio.no>,
"J. Bruce Fields" <bfields@fieldses.org>
Subject: [patch 1/9] lockd: dont return EAGAIN from blocking lock request
Date: Fri, 09 May 2008 14:41:08 +0200 [thread overview]
Message-ID: <20080509124127.179314495@szeredi.hu> (raw)
In-Reply-To: <20080509124107.645600519@szeredi.hu>
[-- Attachment #1: lockd_fix.patch --]
[-- Type: text/plain, Size: 1042 bytes --]
From: Miklos Szeredi <mszeredi@suse.cz>
EAGAIN does not make sense as a return value from a blocking lock
request, the lock should be retried by the kernel until either it is
successful or fails permanently.
Looking at the server side NLM_LCK_DENIED means a permanent error in
this case, so just turn this into an ENOLCK.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: Trond Myklebust <trond.myklebust@fys.uio.no>
CC: "J. Bruce Fields" <bfields@fieldses.org>
---
fs/lockd/clntproc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/fs/lockd/clntproc.c
===================================================================
--- linux-2.6.orig/fs/lockd/clntproc.c 2008-05-09 14:04:16.000000000 +0200
+++ linux-2.6/fs/lockd/clntproc.c 2008-05-09 14:04:46.000000000 +0200
@@ -808,7 +808,7 @@ nlm_stat_to_errno(__be32 status)
case NLM_LCK_GRANTED:
return 0;
case NLM_LCK_DENIED:
- return -EAGAIN;
+ return -ENOLCK;
case NLM_LCK_DENIED_NOLOCKS:
case NLM_LCK_DENIED_GRACE_PERIOD:
return -ENOLCK;
--
next prev parent reply other threads:[~2008-05-09 12:42 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-09 12:41 [patch 0/9] file locking fixes + fuse nfs export support Miklos Szeredi
2008-05-09 12:41 ` Miklos Szeredi [this message]
2008-05-09 18:11 ` [patch 1/9] lockd: dont return EAGAIN from blocking lock request J. Bruce Fields
2008-05-09 18:30 ` Miklos Szeredi
2008-05-09 12:41 ` [patch 2/9] locks: add special return value for asynchronous locks Miklos Szeredi
2008-05-09 12:41 ` [patch 3/9] locks: cleanup code duplication Miklos Szeredi
2008-05-09 12:41 ` [patch 4/9] locks: allow ->lock() to return FILE_LOCK_DEFERRED Miklos Szeredi
2008-05-09 12:41 ` [patch 5/9] fuse: prepare lookup for nfs export Miklos Szeredi
2008-05-09 12:41 ` [patch 6/9] fuse: add export operations Miklos Szeredi
2008-05-09 19:40 ` Christoph Hellwig
2008-05-09 19:46 ` Christoph Hellwig
2008-05-13 8:34 ` Miklos Szeredi
2008-05-13 9:01 ` Christoph Hellwig
2008-05-15 13:07 ` Miklos Szeredi
2008-05-15 14:13 ` Christoph Hellwig
2008-05-09 20:02 ` Erez Zadok
2008-05-13 8:27 ` Miklos Szeredi
2008-05-09 12:41 ` [patch 7/9] fuse: add fuse_lookup_name() helper Miklos Szeredi
2008-05-09 12:41 ` [patch 8/9] fuse: nfs export special lookups Miklos Szeredi
2008-05-09 12:41 ` [patch 9/9] fuse: lockd support Miklos Szeredi
2008-05-09 15:50 ` [patch 0/9] file locking fixes + fuse nfs export support J. Bruce Fields
2008-05-09 15:58 ` Miklos Szeredi
2008-05-09 16:40 ` J. Bruce Fields
2008-05-13 21:05 ` Miklos Szeredi
2008-05-13 21:17 ` J. Bruce Fields
2008-05-13 21:21 ` Miklos Szeredi
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=20080509124127.179314495@szeredi.hu \
--to=miklos@szeredi.hu \
--cc=akpm@linux-foundation.org \
--cc=bfields@fieldses.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=trond.myklebust@fys.uio.no \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®