[pnfs] [PATCH] update pNFS ops to draft 13

Benny Halevy bhalevy at panasas.com
Thu Sep 6 14:02:15 EDT 2007


On Sep 06, 2007, 20:47 +0300, Marc Eshel <eshel at almaden.ibm.com> wrote:
> Benny Halevy <bhalevy at panasas.com> wrote on 09/06/2007 10:31:01 AM:
> 
>> Marc, I have a couple of questions below.
>>
>> Benny
>>
> 
>>> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
>>> index b9e0400..d3ce4a7 100644
>>> --- a/fs/nfsd/nfs4xdr.c
>>> +++ b/fs/nfsd/nfs4xdr.c
>>> @@ -2888,10 +2888,14 @@ nfsd4_encode_devlist_item(struct nfsd4_c
>>>     int len;
>>>     ENCODE_HEAD;
>>>
>>> -   RESERVE_SPACE(8);
>>> +   RESERVE_SPACE(28);
>> Marc, isn't this file layout type specific?
>> How are other layout supposed to reserve space for the da_addr_body?
> 
> This is reserving some minimum space required. The layout type specific 
> starts after specifying the layout type and you can try to reserve more 
> space in that layout specific code.
> 
Hmm, RESERVE_SPACE doesn't actually reserve anything in this nfsd/nfs4xdr.c
it just verifies there's enough space in the buffer so this is harmless.
Still I think it will be much cleaner and comprehensible if the additional
RESERVE_SPACE is moved into filelayout_encode_devaddr or right before calling it.

Benny


More information about the pNFS mailing list