All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Jeff Layton <jlayton@redhat.com>
Cc: Mi Jinlong <mijinlong@cn.fujitsu.com>,
	NFSv3 list <linux-nfs@vger.kernel.org>,
	"J. Bruce Fields" <bfields@fieldses.org>
Subject: Re: [PATCH] NLM: add network test when host expire but hold lock at nlm_gc_hosts
Date: Wed, 02 Dec 2009 09:29:03 -0500	[thread overview]
Message-ID: <1259764143.2663.10.camel@localhost> (raw)
In-Reply-To: <20091202072644.31c5d17e-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>

On Wed, 2009-12-02 at 07:26 -0500, Jeff Layton wrote: 
> On Wed, 02 Dec 2009 17:47:04 +0800
> Mi Jinlong <mijinlong@cn.fujitsu.com> wrote:
> 
> > After a client get lock, it's network partition for some reasons.
> > other client cannot get lock success forever.
> > 
> > This patch can avoid this problem using rpc_ping to test client's
> > network when host expired but hold lock.
> > 
> > If the client's network is partition, server will release client's 
> > lock, other client will get lock success.
> > 
> > Signed-off-by: mijinlong@cn.fujitsu.com
> 
> Yikes! That sounds like it'll make locking subject to the reliability
> of the network. I don't think that's a good idea.
> 
> What might be more reasonable is to consider implementing something
> like the clear_locks command in Solaris. That is, a way for an admin to
> remove server-side locks held by a client that he knows is never going
> to come back. With that, this sort of thing at least becomes a willful
> act...

Agreed on both counts.

We should not be changing the semantics of either NFSv3 or NLM at this
time. That will break existing setups that are treating NFSv3 as being a
stable platform.
As I've said in previous correspondence: NFSv4 already offers lease
based locking. If people are worried about network partitions and/or
locks being held by clients that are dead, then they can switch to that.

On the other hand, a clear_locks command could be useful in order to
tell a server that a given client is dead. It should be fairly easy to
leverage the existing NSM/statd protocol to implement this.

Trond


  parent reply	other threads:[~2009-12-02 14:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-02  9:47 [PATCH] NLM: add network test when host expire but hold lock at nlm_gc_hosts Mi Jinlong
2009-12-02 12:26 ` Jeff Layton
     [not found]   ` <20091202072644.31c5d17e-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2009-12-02 14:29     ` Trond Myklebust [this message]
2009-12-02 17:09       ` J. Bruce Fields
2009-12-02 17:20         ` Chuck Lever
2009-12-03 15:28           ` Chuck Lever
2009-12-07 16:36             ` J. Bruce Fields
2009-12-07 16:59               ` Chuck Lever

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=1259764143.2663.10.camel@localhost \
    --to=trond.myklebust@fys.uio.no \
    --cc=bfields@fieldses.org \
    --cc=jlayton@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=mijinlong@cn.fujitsu.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.