[pnfs] Back from vacation
William A. (Andy) Adamson
andros at citi.umich.edu
Tue Sep 4 16:30:39 EDT 2007
Hi Marc
The patch sets the current_session->cs_sid.clientid for NFSv4.0 opens.
I don't see where the current_session->cs_sid is used by an NFS4.0 client.
Besides nfsd4_open, it's only used in nfsd4_layoutget/commit/return and
nfsd4_sequence. Also, the existence of the current_session pointer is
checked in nfsd4_lock() and nfsd4_lockt() in the STALE_CLIENTID test, so if
it is present for NFSv4.0 calls, the behavior is wrong.
Unless I'm missing something - I think the following patch which keeps the
current_session pointer NULL for NFSv4.0 will do the same job, and work
correctly for nfsd4_lock and nfsd4_lockt.
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index f90ea73..68133c4 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -1130,9 +1130,11 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
goto out;
fh_init(save_fh, NFS4_FHSIZE);
#if defined(CONFIG_NFSD_V4_1)
- current_ses = kzalloc(sizeof(*current_ses), GFP_KERNEL);
- if (current_ses == NULL)
- goto out;
+ if (args->minorversion == 1) {
+ current_ses = kzalloc(sizeof(*current_ses), GFP_KERNEL);
+ if (current_ses == NULL)
+ goto out;
+ }
#endif
resp->xbuf = &rqstp->rq_res;
On 9/4/07, Marc Eshel <eshel at almaden.ibm.com> wrote:
>
> We need this fix and unless someone what to do it in a different way it
> should be added.
> Marc.
>
> pnfs-bounces at linux-nfs.org wrote on 09/04/2007 11:07:08 AM:
>
> > 3) do not add:
> > [pnfs] [PATCH] Get NFSv4 client to work with NFSv4.1 server. Marc Eshe
>
> > [pnfs] [PATCH] Get NFSv4 client to work with NFSv4.1 server. Benny
> Halevy
> > [pnfs] [PATCH] Get NFSv4 client to work with NFSv4.1 server. Marc
> Eshel
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://linux-nfs.org/pipermail/pnfs/attachments/20070904/4702c6d0/attachment.htm
More information about the pNFS
mailing list