From: "J. Bruce Fields" <bfields@citi.umich.edu>
To: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/2] nfsd4: complete enforcement of 4.1 op ordering
Date: Thu, 22 Apr 2010 11:03:13 -0400 [thread overview]
Message-ID: <20100422150313.GB5926@fieldses.org> (raw)
In-Reply-To: <20100422144831.GA5926@fieldses.org>
On Thu, Apr 22, 2010 at 10:48:31AM -0400, J. Bruce Fields wrote:
> On Thu, Apr 22, 2010 at 10:32:23AM -0400, J. Bruce Fields wrote:
> > Enforce the rules about compound op ordering.
> >
> > Motivated by implementing RECLAIM_COMPLETE, for which the client is
> > implicit in the current session, so it is important to ensure a
> > succesful SEQUENCE proceeds the RECLAIM_COMPLETE.
>
> The other problem here is that while we have a reference count on the
> session itself preventing it from going away till the compound is done,
> I don't see what prevents the associated clientid from going away.
That session reference counting also doesn't make sense to me: we should
never allow a client to disappear while a session is in use.
> > +static bool nfsd4_last_compound_op(struct svc_rqst *rqstp)
> > +{
> > + struct nfsd4_compoundres *resp = rqstp->rq_resp;
> > + struct nfsd4_compoundargs *argp = rqstp->rq_argp;
> > +
> > + return argp->opcnt == resp->opcnt;
> > +}
> > +
> > __be32
> > nfsd4_destroy_session(struct svc_rqst *r,
> > struct nfsd4_compound_state *cstate,
> > @@ -1380,6 +1388,11 @@ nfsd4_destroy_session(struct svc_rqst *r,
> > * - Do we need to clear any callback info from previous session?
> > */
> >
Also to do in destroy_session, from
http://tools.ietf.org/search/rfc5661#section-13.9 "DESTROY_SESSION MUST
be invoked on a connection that is associated with the session being
destroyed." We should probably be enforcing that here. I'm not sure
what error to return.
--b.
> > + if (!memcmp(&sessionid->sessionid, &cstate->session->se_sessionid,
> > + sizeof(struct nfs4_sessionid))) {
> > + if (!nfsd4_last_compound_op(r))
> > + return nfserr_not_only_op;
> > + }
> > dump_sessionid(__func__, &sessionid->sessionid);
> > spin_lock(&sessionid_lock);
> > ses = find_in_sessionid_hashtbl(&sessionid->sessionid);
> > --
> > 1.6.3.3
> >
next prev parent reply other threads:[~2010-04-22 15:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 14:32 [PATCH 1/2] nfsd4: complete enforcement of 4.1 op ordering J. Bruce Fields
2010-04-22 14:32 ` [PATCH 2/2] nfsd4: implement reclaim_complete J. Bruce Fields
2010-04-22 14:48 ` [PATCH 1/2] nfsd4: complete enforcement of 4.1 op ordering J. Bruce Fields
2010-04-22 15:03 ` J. Bruce Fields [this message]
2010-04-23 21:24 ` J. Bruce Fields
2010-04-23 23:13 ` J. Bruce Fields
2010-04-24 0:10 ` J. Bruce Fields
2010-04-27 15:03 ` Benny Halevy
2010-04-27 14:40 ` Benny Halevy
2010-04-27 15:01 ` J. Bruce Fields
2010-04-27 15:44 ` Benny Halevy
2010-04-27 16:36 ` J. Bruce Fields
2010-04-27 15:46 ` Benny Halevy
2010-04-27 16:12 ` J. Bruce Fields
2010-04-27 16:22 ` Benny Halevy
2010-04-27 16:34 ` J. Bruce Fields
2010-04-27 16:44 ` Benny Halevy
2010-04-27 18:10 ` 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=20100422150313.GB5926@fieldses.org \
--to=bfields@citi.umich.edu \
--cc=linux-nfs@vger.kernel.org \
/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