Pnfs client rewrite may 2006

From Linux NFS

Revision as of 19:10, 3 May 2006 by Andros (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

pNFS

The main purpose of this rewrite is to cleanly separate the pNFS code path from the NFSv2/3/4 code path, getting rid of as many pNFS #ifdefs as possible along the way. To that end, I followed the method used to separate the NFSv2/v3/v4 specific code paths - I created a pNFS rpc_ops structure and appropriate operations.

The NFSv4 client starts out using the normal nfs_v4_clientops. The client switches to the new pnfs_v4_clientops in set_pnfs_layoutdriver, after the layoutdriver has been negotiated with the server, and successfully initialized. The pnfs_v4_clientops also contain a reference to the new pnfs_file_operations.

Four new rpc_ops are introduced to handle which read and write size should be used for preparing pages for I/0. These new rpc_ops allow the pNFS code path to choose between the MDS read/write sizes vrs the Data Server read/write sizes. There is still a chicken-and-egg problem in the pNFS code path due to this choice being made prior to the request size being known.

   rsize(struct inode *,struct nfs_read_data *) 
   wsize(struct ionde *, struct nfs_write_data *) 
   rpages(struct inode *, unsigned int *)
   wpages(struct inode *, unsigned int *)

Two new rpc_ops are introduced to separate NFSv2/v3/v4 processing from pNFS processing.


Personal tools