[pnfs] [PATCH 03/25] pnfs: block: blocklayout stub
Benny Halevy
bhalevy at panasas.com
Fri Feb 15 07:56:53 EST 2008
On Feb. 14, 2008, 20:21 +0200, Fred Isaman <iisaman at citi.umich.edu> wrote:
> Adds the minimal structure for a pnfs block layout driver,
> with all function pointers aimed at stubs.
>
> Signed-off-by: Fred Isaman <iisaman at citi.umich.edu>
> ---
> fs/nfs/Makefile | 2 +
> fs/nfs/nfs4blocklayout.c | 224 ++++++++++++++++++++++++++++++++++++++++++++++
> include/linux/nfs_fs.h | 1 +
> 3 files changed, 227 insertions(+), 0 deletions(-)
> create mode 100644 fs/nfs/nfs4blocklayout.c
>
> diff --git a/fs/nfs/Makefile b/fs/nfs/Makefile
> index 81c8837..be2afdd 100644
> --- a/fs/nfs/Makefile
> +++ b/fs/nfs/Makefile
> @@ -21,3 +21,5 @@ nfs-$(CONFIG_SYSCTL) += sysctl.o
>
> obj-m += nfslayoutdriver.o
> nfslayoutdriver-objs := nfs4filelayout.o nfs4filelayoutdev.o
> +obj-m += blocklayoutdriver.o
> +blocklayoutdriver-objs := nfs4blocklayout.o
> diff --git a/fs/nfs/nfs4blocklayout.c b/fs/nfs/nfs4blocklayout.c
> new file mode 100644
> index 0000000..b23e163
> --- /dev/null
> +++ b/fs/nfs/nfs4blocklayout.c
> @@ -0,0 +1,224 @@
> +/*
> + * linux/fs/nfs/nfs4blocklayout.c
> + *
> + * Module for the NFSv4.1 pNFS block layout driver.
> + *
> + * Copyright (c) 2006 The Regents of the University of Michigan.
> + * All rights reserved.
> + *
> + * Andy Adamson <andros at citi.umich.edu>
> + * Fred Isaman <iisaman at umich.edu>
> + *
> + * permission is granted to use, copy, create derivative works and
> + * redistribute this software and such derivative works for any purpose,
> + * so long as the name of the university of michigan is not used in
> + * any advertising or publicity pertaining to the use or distribution
> + * of this software without specific, written prior authorization. if
> + * the above copyright notice or any other identification of the
> + * university of michigan is included in any copy of any portion of
> + * this software, then the disclaimer below must also be included.
> + *
> + * this software is provided as is, without representation from the
> + * university of michigan as to its fitness for any purpose, and without
> + * warranty by the university of michigan of any kind, either express
> + * or implied, including without limitation the implied warranties of
> + * merchantability and fitness for a particular purpose. the regents
> + * of the university of michigan shall not be liable for any damages,
> + * including special, indirect, incidental, or consequential damages,
> + * with respect to any claim arising out or in connection with the use
> + * of the software, even if it has been or is hereafter advised of the
> + * possibility of such damages.
> + */
> +#include <linux/module.h>
> +#include <linux/init.h>
> +
> +#include <linux/nfs_fs.h>
> +#include <linux/pnfs_xdr.h> /* Needed by nfs4_pnfs.h */
> +#include <linux/nfs4_pnfs.h>
> +
> +#define NFSDBG_FACILITY NFSDBG_BLOCKLAYOUT
> +
> +MODULE_LICENSE("GPL");
> +MODULE_AUTHOR("Andy Adamson <andros at citi.umich.edu>");
> +MODULE_DESCRIPTION("The NFSv4.1 pNFS Block layout driver");
> +
> +/* Callback operations to the pNFS client */
> +struct pnfs_client_operations *pnfs_callback_ops;
> +
> +static int
> +bl_commit(struct pnfs_layout_type *layoutid,
> + int sync,
> + struct nfs_write_data *nfs_data)
> +{
> + dprintk("%s enter\n", __FUNCTION__);
Also, it will help to globally substitute __FUNCTION__ with __func__
checkpatch.pl is going to complain about that soon anyway...
Benny
More information about the pNFS
mailing list