Re: [PATCH 16/26] NFS: create completion structure to pass into page_init functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2012-04-09 at 16:52 -0400, Fred Isaman wrote:
> Factors out the code that will need to change when directio
> starts using these code paths.  This will allow directio to use
> the generic pagein and flush routines
> 
> Signed-off-by: Fred Isaman <iisaman@xxxxxxxxxx>
> ---

> --- a/fs/nfs/read.c
> +++ b/fs/nfs/read.c
> @@ -31,6 +31,7 @@
>  
>  static const struct nfs_pageio_ops nfs_pageio_read_ops;
>  static const struct rpc_call_ops nfs_read_common_ops;
> +static const struct nfs_io_completion_ops nfs_asynch_read_compl_ops;

Could we please rename? I'd prefer nfs_async_read_completion_ops. It's
more in line with how we usually name stuff (we use the abbreviations
'async' and 'ops' everywhere, but we don't commonly abbreviate
'completion').

> diff --git a/fs/nfs/write.c b/fs/nfs/write.c
> index cde0fa2..4d9bbaf 100644
> --- a/fs/nfs/write.c
> +++ b/fs/nfs/write.c
> @@ -40,10 +40,12 @@
>   * Local function declarations
>   */
>  static void nfs_pageio_init_write(struct nfs_pageio_descriptor *desc,
> -				  struct inode *inode, int ioflags);
> +				  struct inode *inode, int ioflags,
> +				  const struct nfs_io_completion_ops *compl_ops);
>  static void nfs_redirty_request(struct nfs_page *req);
>  static const struct rpc_call_ops nfs_write_common_ops;
>  static const struct rpc_call_ops nfs_commit_ops;
> +static const struct nfs_io_completion_ops nfs_asynch_write_compl_ops;

Ditto
 
>  
>  void nfs_write_prepare(struct rpc_task *task, void *calldata)
> diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
> index 5c52034..a36fbb6 100644
> --- a/include/linux/nfs_page.h
> +++ b/include/linux/nfs_page.h
> @@ -67,6 +67,7 @@ struct nfs_pageio_descriptor {
>  	int 			pg_ioflags;
>  	int			pg_error;
>  	const struct rpc_call_ops *pg_rpc_callops;
> +	const struct nfs_io_completion_ops *pg_compl_ops;

Again, can we please make this 'pg_completion_ops'?

>  	struct pnfs_layout_segment *pg_lseg;
>  };
>  
>  extern	int nfs_pageio_add_request(struct nfs_pageio_descriptor *,
> diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
> index 2bbb7c7..b38950c 100644
> --- a/include/linux/nfs_xdr.h
> +++ b/include/linux/nfs_xdr.h
> @@ -1201,6 +1201,7 @@ struct nfs_pgio_header {
>  	struct pnfs_layout_segment *lseg;
>  	const struct rpc_call_ops *mds_ops;
>  	void (*release) (struct nfs_pgio_header *hdr);
> +	const struct nfs_io_completion_ops *compl_ops;

Ditto...



-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com

��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux