[pnfs] nfsd layout cache design for layoutrecall
J. Bruce Fields
bfields at fieldses.org
Thu May 3 19:16:32 EDT 2007
Random remarks:
On Thu, May 03, 2007 at 11:22:59PM +0300, Benny Halevy wrote:
> > * changed cl_count in nfs4_client into a kref.
> > nfs4_{get,put}_client take and release a reference on the
> > client structure under the state lock.
> >
> > * layoutrecall manipulation is also done under the state lock,
> > not under the recall lock. Special care taken when sending
> > the recalls to avoid distributed deadlock - client sending
> > layoutreturns while serving a cb_layoutrecall, described
> > in more details below...
We've never been totally happy with the way everything in nfsd4 is done
under the big state lock. Not that it's up to you to fix that, but it's
just something to keep in mind....
> > * struct nfs4_file:
> > added fsid and filehandle to the structure.
> > these are accessed in the get, return, and recall paths
> > through a pointer to the nfs4_file structure
> > rather than copying the data into each nfs4_layout and nfs4_layoutrecall
> > instance.
> >
> > +#ifdef CONFIG_PNFS
> > + /* used by layoutget / layoutrecall */
> > + struct nfs4_fsid fi_fsid;
> > + u32 fi_fhlen;
> > + u32 fi_fhval[NFS4_FHSIZE];
NFS4_FHSIZE is in bytes, isn't it? (Oops, I think we made that mistake
in the v4.0 code too.)
> > * nfs4_layoutrecall
> > tracks outstanding layoutrecalls
> > listed only per client
> > but keeps a reference both on the respective client and file
> > (if applicable, can be NULL in the RECALL_ALL case)
> > clr_flags field used for marking the layoutrecall done and deciding
> > who's freeing it.
Is there a chance it would be possible to use reference counting for that?
--b.
More information about the pNFS
mailing list