From: "J. Bruce Fields" <bfields@fieldses.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org,
Trond Myklebust <trond.myklebust@fys.uio.no>
Subject: Re: [patch 1/9] lockd: dont return EAGAIN from blocking lock request
Date: Fri, 9 May 2008 14:11:06 -0400 [thread overview]
Message-ID: <20080509181106.GF1907@fieldses.org> (raw)
In-Reply-To: <20080509124127.179314495@szeredi.hu>
On Fri, May 09, 2008 at 02:41:08PM +0200, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@suse.cz>
>
> EAGAIN does not make sense as a return value from a blocking lock
But nlm_stat_to_errno() is called in the non-blocking case too, right?
What am I missing?
--b.
> 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 18:11 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 ` [patch 1/9] lockd: dont return EAGAIN from blocking lock request Miklos Szeredi
2008-05-09 18:11 ` J. Bruce Fields [this message]
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=20080509181106.GF1907@fieldses.org \
--to=bfields@fieldses.org \
--cc=akpm@linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--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;
as well as URLs for NNTP newsgroup(s).