From: "J. Bruce Fields" <bfields@fieldses.org>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Jim Rees <rees@umich.edu>, 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 23:09:45 -0500 [thread overview]
Message-ID: <20110301040945.GC17725@fieldses.org> (raw)
In-Reply-To: <1298937633.18451.9.camel@heimdal.trondhjem.org>
On Mon, Feb 28, 2011 at 07:00:33PM -0500, Trond Myklebust wrote:
> On Mon, 2011-02-28 at 18:22 -0500, Jim Rees wrote:
> > Trond Myklebust wrote:
> >
> > 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)
> > 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?
> >
> > That helps, thanks. I'll see if I can figure out what's going wrong.
> >
> > At the server, I see a delegreturn followed by a setattr using the returned
> > stateid. The server returns BAD_STATEID. I'll look to see if the client
> > then retries.
> >
> > At the client, I see a non-null nfsi->delegation after the delgreturn, and
> > the application gets a EIO.
>
> That's because your server is confusing the hell out of us all by giving
> out a delegation as part of the reply (in frame 5328) to the
> OPEN(CLAIM_DELEGATE_CUR) in frame 5325.
>
> IOW: the client is in the process of returning the delegation, and asks
> to trade in the delegation stateid into an open stateid, then the server
> replies with an open stateid, and the delegation stateid...
Which server is this, Jim?
(I checked the Linux server quickly and it doesn't look like it should
do this....)
--b.
next prev parent reply other threads:[~2011-03-01 4:09 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
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 [this message]
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=20110301040945.GC17725@fieldses.org \
--to=bfields@fieldses.org \
--cc=Trond.Myklebust@netapp.com \
--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.