[pnfs] Server sessions slot table patches
Benny Halevy
bhalevy at panasas.com
Wed Apr 4 12:34:01 EDT 2007
William A. (Andy) Adamson wrote:
> hi benny
>
> On 4/4/07, Benny Halevy <bhalevy at panasas.com> wrote:
>> Andy, my comments in "=>"
>> Benny
>>
>> 0003-Declare-server-sessionid_t-and-rename-server-session.patch:
>> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
>> @@ -369,15 +362,15 @@ add_to_sessionid_hashtbl(clientid_t *clientid,
>> sessionid_t *sessionid)
>> if (!new)
>> goto out;
>>
>> - memcpy(&new->clientid, clientid, sizeof(*clientid));
>> - memcpy(&new->sessionid, *sessionid, sizeof(sessionid_t));
>> + memcpy(&new->se_clientid, clientid, sizeof(*clientid));
>> + memcpy(&new->se_sessionid, *sessionid, sizeof(sessionid_t));
>>
>> => (isn't dereferencing sessionid a bug here?)
>> + memcpy(&new->se_sessionid, sessionid, sizeof(sessionid_t));
>
>
> sessionid is allocated as is new->se_sessionid. why do you see a bug?
you want to copy the data pointed by sessionid not by *sessionid
>> 0009-Server-exchange_id-to-draft-ietf-nfsv4-minorversion1.patch:
>> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
>> @@ -443,16 +446,28 @@ check:
>> return elem;
>> }
>>
>> -void
>> -release_session(struct nfs41_session *ses)
>> +static void
>> +nfs41_free_session(struct kref *kref)
>> {
>> + struct nfs41_session *ses = container_of(kref, struct
>> nfs41_session, se_ref);
>> +
>> list_del(&ses->se_hash);
>> list_del(&ses->se_perclnt);
>> - if (ses->se_slots)
>> - kfree(ses->se_slots);
>> => I don't get it, this was added in patch 0008 and removed here,
>> => who frees se_slots then?
>
>
> i added reference counting on the nfs41_session struct, and used the kref
> architecture (used several places in the v4 server code).
>
> look at the kref_put() function. it calls the registered free function when
> the reference count goes from 1->0.
right, but nfs41_free_session does not call kfree(ses->se_slots)
and nobody else seems to do that.
>
>
> kfree(ses);
>> }
>>
>>
>> William A. (Andy) Adamson wrote:
>>> hi
>>>
>>> here are 9 patches that implement the server slot table management.
>> there is
>>> not DRC yet, but this code has been developed with the DRC in mind. This
>>> code almost passes the connectathon tests on the 4.1-sessions branch
>> with
>>> the client patches i just sent out.
>>>
>>> it fails the general connectathon tests with an NFS4ERR_SEQ_MISORDERED.
>> i
>>> note that the client mostly uses slot 0, and occasionally uses slot 1.
>> the
>>> slot 1 sequence is out of order - i don't know if it is the client or
>>> server.
>>>
>>> please review the patches...
>>>
>>> thanks
>>>
>>> -->Andy
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> pNFS mailing list
>>> pNFS at linux-nfs.org
>>> http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs
>>
>
More information about the pNFS
mailing list