[pnfs] CVS: nfsv4
Benny Halevy
bhalevy at panasas.com
Sun Dec 10 11:08:26 EST 2006
Marc Eshel wrote:
> Hi Benny,
> I am not sure that this is a bug. So you want to share the same layout
> struct on the server for all clients ? That might be more difficult to
> keep track of which client has which byte range. I had a layout struct per
> client which is also on the file struct. So if you need to see all layouts
> per client you run the chain of the client struct and if you need to see
> all the layouts per file you run the chain of the file struct.
> Marc.
Yes, we need a more efficient way to track the layouts eventually
but now the while() expression checked the client list while
the list operation is on the file's list. The client had a layout
for a different file while the file's layout list was empty...
I completely agree that you should either check against the per-client
list and compare the file and byte range, or check against the
per-file list and match the client and byte range. I'm not sure
what will be more efficient though...
If we keep a counter on both lists we can make the decision in run-time,
however, since file sharing is less common I believe that the per-file
list should typically be shorter than or equal to the per-client list.
Having an efficient hash table rather than a list should help both cases :)
>
>
> pnfs-bounces at linux-nfs.org wrote on 12/07/2006 11:06:01 PM:
>
>> CVSROOT: /cvs
>> Module name: nfsv4
>> Changes by: bhalevy at citi. 2006/12/08 02:06:01
>>
>> Modified files:
>> cvs/pnfs/fs/nfsd: nfs4state.c
>>
>> Log message:
>> Fix bug in nfs4_pnfs_get_layout()
>>
>> Index: fs/nfsd/nfs4state.c
>> ===================================================================
>> RCS file: /cvs/nfsv4/cvs/pnfs/fs/nfsd/nfs4state.c,v
>> retrieving revision 1.21
>> diff -u -p -r1.21 nfs4state.c
>> --- fs/nfsd/nfs4state.c 6 Dec 2006 23:18:02 -0000 1.21
>> +++ fs/nfsd/nfs4state.c 8 Dec 2006 07:05:03 -0000
>> @@ -3551,7 +3551,7 @@ int nfs4_pnfs_get_layout(struct super_bl
>> goto out;
>>
>> lgp->lg_flags = 0;
>> - while (!list_empty(&clp->cl_layouts)) {
>> + while (!list_empty(&fp->fi_layouts)) {
>> lp = list_entry(fp->fi_layouts.next,
>> struct nfs4_layout, lo_perfile);
>> //??? if the right layout
>>
>> _______________________________________________
>> pNFS mailing list
>> pNFS at linux-nfs.org
>> http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs
>
> _______________________________________________
> pNFS mailing list
> pNFS at linux-nfs.org
> http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs
More information about the pNFS
mailing list