[pnfs] Back from vacation
Marc Eshel
eshel at almaden.ibm.com
Tue Sep 4 17:00:14 EDT 2007
Maybe it is the wrong way to fix it. If you want to see the problem
without this fix try to touch a file from client running 2.6.22 (no pNFS
code) and our pNFS server on 2.6.18.
Marc.
"William A. (Andy) Adamson" <andros at citi.umich.edu>
Sent by: androsadamson at gmail.com
09/04/2007 01:30 PM
To
"Marc Eshel" <eshel at almaden.ibm.com>
cc
pnfs at linux-nfs.org
Subject
Re: [pnfs] Back from vacation
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
>
>
More information about the pNFS
mailing list