From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Jim Rees <rees@umich.edu>
Cc: Benny Halevy <bhalevy@panasas.com>,
linux-nfs@vger.kernel.org, peter honeyman <honey@citi.umich.edu>
Subject: Re: [PATCH] zero out delegation in the inode after it has been returned
Date: Mon, 28 Feb 2011 17:04:58 -0500 [thread overview]
Message-ID: <1298930698.8564.51.camel@heimdal.trondhjem.org> (raw)
In-Reply-To: <1298930494.8564.50.camel@heimdal.trondhjem.org>
On Mon, 2011-02-28 at 17:01 -0500, Trond Myklebust wrote:
> On Mon, 2011-02-28 at 16:54 -0500, Jim Rees wrote:
> > Trond Myklebust wrote:
> >
> > nfsi->delegation is released under the appropriate locks well before we
> > get here. The above line is 100% racy and risks clobbering any new
> > delegation that has been issued after the delegreturn completed...
> >
> > I'd have been amazed if I'd gotten it right. But there really is a problem
> > here, the client does try to use delegations that have been returned, and
> > this patch does solve that problem. I'm happy to keep after this but would
> > appreciate any suggestions or nudges in the right direction.
>
> The procedure for returning delegations is supposed to work as follows:
>
> 1. Remove the nfsi->delegation so that it is no longer visible to
> new open() requests
> 2. write back any dirty data to the server
> 3. Reclaim any locks
> 4. Reclaim any open stateids (using CLAIM_DELEGATE_CUR)
Errr.... lock reclaim comes after open reclaim, of course...
The rest is correct.
> 5. delegreturn
>
> While there may indeed be the odd READ or WRITE that races between 4.
> and 5., so that the server receives the delegation stateid after the
> delegreturn, that shouldn't matter: the server returns an error, and the
> client should retry using the new open stateid.
>
> What is failing to work correctly here?
>
next prev parent reply other threads:[~2011-02-28 22:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-28 21:31 [PATCH] zero out delegation in the inode after it has been returned Jim Rees
2011-02-28 21:39 ` Trond Myklebust
2011-02-28 21:54 ` Jim Rees
2011-02-28 22:01 ` Trond Myklebust
2011-02-28 22:04 ` Trond Myklebust [this message]
2011-02-28 23:22 ` Jim Rees
2011-03-01 0:00 ` Trond Myklebust
2011-03-01 0:07 ` Trond Myklebust
2011-03-01 4:09 ` J. Bruce Fields
2011-03-01 9:52 ` daniel.gardere
2011-03-01 12:16 ` Trond Myklebust
2011-03-01 13:06 ` daniel.gardere
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=1298930698.8564.51.camel@heimdal.trondhjem.org \
--to=trond.myklebust@fys.uio.no \
--cc=bhalevy@panasas.com \
--cc=honey@citi.umich.edu \
--cc=linux-nfs@vger.kernel.org \
--cc=rees@umich.edu \
/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.