All of lore.kernel.org
 help / color / mirror / Atom feed
* server 4.1 issues list
@ 2010-10-07 15:53 J. Bruce Fields
  2010-10-07 17:54 ` J. Bruce Fields
  0 siblings, 1 reply; 3+ messages in thread
From: J. Bruce Fields @ 2010-10-07 15:53 UTC (permalink / raw)
  To: linux-nfs

Based on conversation at the bakeathon yesterday, I've updated

	http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues

Changes:
	- Mark deferral fixes done.
	- Update in-progress status at
	  http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues#4.1
	- Add callback error handling.
	- Various minor clarifications.

Some sort of difficulty or time-required rating was also requested, but
I haven't attempted that.

Someone asked whether we error out as we should on
mandatory-not-to-implement 4.1 operations; from a quick check of the
code it appears that we do, so I haven't added that.

Someone also asked whether we've fixed the backchannel attribute
checking.  We haven't, but that should be fairly quick--I'll take a look
at it now.

--b.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: server 4.1 issues list
  2010-10-07 15:53 server 4.1 issues list J. Bruce Fields
@ 2010-10-07 17:54 ` J. Bruce Fields
  2010-10-07 18:10   ` Benny Halevy
  0 siblings, 1 reply; 3+ messages in thread
From: J. Bruce Fields @ 2010-10-07 17:54 UTC (permalink / raw)
  To: linux-nfs

On Thu, Oct 07, 2010 at 11:53:06AM -0400, bfields wrote:
> Someone also asked whether we've fixed the backchannel attribute
> checking.  We haven't, but that should be fairly quick--I'll take a look
> at it now.

Actually there's a bit of tedious arithmetic to do here to figure out
what we need e.g. for the maximum request size.  I'm setting this aside
for now, so this is up for grabs.

--b.

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 6233917..0f8e90b 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1493,6 +1493,23 @@ nfsd4_replay_create_session(struct nfsd4_create_session *cr_ses,
 	return slot->sl_status;
 }
 
+static __be32 verify_backchannel_attributes(struct nfsd4_create_session *cr_ses)
+{
+	struct nfsd4_channel_attrs *attrs;
+
+	if (!cses->flags & SESSION4_BACK_CHAN)
+		return nfs_ok;
+	if (attrs.maxreqs < 1)
+		return nfserr_inval;
+	/* XXX: check other fields here; see
+	 * http://tools.ietf.org/search/rfc5661#section-18.36 to
+	 * determine when we can modify the fields to be acceptable, and
+	 * when we must return inval.  We'll need to figure out the
+	 * things like how large a callback request we need to be able to
+	 * send. */
+	return nfs_ok;
+}
+
 __be32
 nfsd4_create_session(struct svc_rqst *rqstp,
 		     struct nfsd4_compound_state *cstate,
@@ -1553,6 +1570,9 @@ nfsd4_create_session(struct svc_rqst *rqstp,
 	cr_ses->flags &= ~SESSION4_PERSIST;
 	cr_ses->flags &= ~SESSION4_RDMA;
 
+	status = verify_backchannel_attributes(cr_ses);
+	if (status)
+		goto out;
 	status = nfserr_jukebox;
 	new = alloc_init_session(rqstp, conf, cr_ses);
 	if (!new)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: server 4.1 issues list
  2010-10-07 17:54 ` J. Bruce Fields
@ 2010-10-07 18:10   ` Benny Halevy
  0 siblings, 0 replies; 3+ messages in thread
From: Benny Halevy @ 2010-10-07 18:10 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: linux-nfs

On 2010-10-07 13:54, J. Bruce Fields wrote:
> On Thu, Oct 07, 2010 at 11:53:06AM -0400, bfields wrote:
>> Someone also asked whether we've fixed the backchannel attribute
>> checking.  We haven't, but that should be fairly quick--I'll take a look
>> at it now.
> 
> Actually there's a bit of tedious arithmetic to do here to figure out
> what we need e.g. for the maximum request size.  I'm setting this aside
> for now, so this is up for grabs.

Ack. FWIW :)

> 
> --b.
> 
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index 6233917..0f8e90b 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -1493,6 +1493,23 @@ nfsd4_replay_create_session(struct nfsd4_create_session *cr_ses,
>  	return slot->sl_status;
>  }
>  
> +static __be32 verify_backchannel_attributes(struct nfsd4_create_session *cr_ses)
> +{
> +	struct nfsd4_channel_attrs *attrs;
> +
> +	if (!cses->flags & SESSION4_BACK_CHAN)
> +		return nfs_ok;
> +	if (attrs.maxreqs < 1)
> +		return nfserr_inval;
> +	/* XXX: check other fields here; see
> +	 * http://tools.ietf.org/search/rfc5661#section-18.36 to
> +	 * determine when we can modify the fields to be acceptable, and
> +	 * when we must return inval.  We'll need to figure out the
> +	 * things like how large a callback request we need to be able to
> +	 * send. */
> +	return nfs_ok;
> +}
> +
>  __be32
>  nfsd4_create_session(struct svc_rqst *rqstp,
>  		     struct nfsd4_compound_state *cstate,
> @@ -1553,6 +1570,9 @@ nfsd4_create_session(struct svc_rqst *rqstp,
>  	cr_ses->flags &= ~SESSION4_PERSIST;
>  	cr_ses->flags &= ~SESSION4_RDMA;
>  
> +	status = verify_backchannel_attributes(cr_ses);
> +	if (status)
> +		goto out;
>  	status = nfserr_jukebox;
>  	new = alloc_init_session(rqstp, conf, cr_ses);
>  	if (!new)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
=

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-07 18:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-07 15:53 server 4.1 issues list J. Bruce Fields
2010-10-07 17:54 ` J. Bruce Fields
2010-10-07 18:10   ` Benny Halevy

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.