Linux NFS development
 help / color / mirror / Atom feed
From: Frank van Maarseveen <frankvm@frankvm.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Linux NFS mailing list <nfs@lists.sourceforge.net>
Subject: Re: [PATCH] lockd: unlock when client rejects GRANTED_MSG
Date: Wed, 4 Jul 2007 00:24:19 +0200	[thread overview]
Message-ID: <20070703222419.GD16497@janus> (raw)
In-Reply-To: <20070703205302.GV14074@fieldses.org>

On Tue, Jul 03, 2007 at 04:53:02PM -0400, J. Bruce Fields wrote:
> On Sun, Jul 01, 2007 at 05:11:54PM +0200, Frank van Maarseveen wrote:
> > On Sun, Jul 01, 2007 at 10:58:32AM -0400, J. Bruce Fields wrote:
> > > On Sun, Jul 01, 2007 at 04:38:01PM +0200, Frank van Maarseveen wrote:
> > > > 
> > > > When lockd grants a blocked lock request after a while then the client
> > > > response on it should not be ignored: When the client rejects GRANTED_MSG
> > > > with GRANTED_RES NLM_LCK_DENIED then lockd on the server must release
> > > > the POSIX lock.
> > > 
> > > There's not really any way to "remove" a posix lock.  All you can do is
> > > issue an unlock, which isn't quite the same--for example, consider the
> > > case when the granted lock was a read lock downgrading a previously
> > > write-locked region.  Or perhaps it was locking a region only some of
> > > whose bytes where previously locked.
> > > 
> > > I have some bit-rotting patches that define a new "provisional" lock
> > > type that is like a posix lock except that it isn't combined with other
> > > existing locks--such a lock has the advantage that it really can be
> > > completely undone.  You can then break up the lock-applying process into
> > > two steps:
> > > 
> > > 	1. first apply a "provisional" lock (marked with an FL_BLOCK
> > > 	   lock type in my code), then
> > > 	2. when whoever originally requested the lock requests it,
> > > 	   convert the provisional lock until a real posix lock,
> > > 	   combining it with other locks as necessary.
> > > 
> > > So we could handle your case by delaying step number 2 until we get an
> > > affirmative response to the grant.
> > 
> > The affirmative response will never happen
> 
> The point of that scheme is that we can also handle a negative response,
> since the provisional lock is (unlike a regular posix lock) something
> that can be cancelled.
> 
> But I don't know how useful that really is in this case.

I think your patch is addressing something different. It _might_ fix
the nlm_grant_reply() bug as a side effect but that's already done by
the small patch I posted earlier so... I think it is best to consider
these issues separately.

But I'm still unsure about who's picking up NLM patches and if server
or client side matters.


-- 
Frank

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

  reply	other threads:[~2007-07-03 22:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-29 15:52 NFSv3 locking bugs (trace+testprogram included) Frank van Maarseveen
2007-07-01 14:38 ` [PATCH] lockd: unlock when client rejects GRANTED_MSG Frank van Maarseveen
2007-07-01 14:58   ` J. Bruce Fields
2007-07-01 15:11     ` Frank van Maarseveen
2007-07-03 20:43       ` J. Bruce Fields
2007-07-03 20:53       ` J. Bruce Fields
2007-07-03 22:24         ` Frank van Maarseveen [this message]
2007-07-03 22:30           ` J. Bruce Fields

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=20070703222419.GD16497@janus \
    --to=frankvm@frankvm.com \
    --cc=bfields@fieldses.org \
    --cc=nfs@lists.sourceforge.net \
    /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