All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benny Halevy <bhalevy@panasas.com>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Boaz Harrosh <bharrosh@panasas.com>, linux-nfs@vger.kernel.org
Subject: [PATCH v8 13/32] pnfs-obj: objlayoutdriver module skeleton
Date: Thu, 26 May 2011 00:28:03 +0300	[thread overview]
Message-ID: <1306358883-17258-1-git-send-email-bhalevy@panasas.com> (raw)
In-Reply-To: <4DDD7392.6040505@panasas.com>

* Define the PNFS_OBJLAYOUT Kconfig option in the nfs
  master Kconfig file.
* Add the objlayout driver to the Kernel's Kbuild system.
* Add the fs/nfs/objlayout/Kbuild file for building the
  objlayoutdriver.ko driver
* Define fs/nfs/objlayout/objio_osd.c, register the driver on module
  initialization and unregister on exit.

[pnfs-obj: remove of CONFIG_PNFS fallout]
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
[added "unsure" clause]
[depend on NFS_V4_1]
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/Kconfig               |   10 +++++
 fs/nfs/Makefile              |    2 +
 fs/nfs/objlayout/Kbuild      |    5 +++
 fs/nfs/objlayout/objio_osd.c |   76 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 93 insertions(+), 0 deletions(-)
 create mode 100644 fs/nfs/objlayout/Kbuild
 create mode 100644 fs/nfs/objlayout/objio_osd.c

diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig
index ba30665..8151554 100644
--- a/fs/nfs/Kconfig
+++ b/fs/nfs/Kconfig
@@ -87,6 +87,16 @@ config NFS_V4_1
 config PNFS_FILE_LAYOUT
 	tristate
 
+config PNFS_OBJLAYOUT
+	tristate "Provide support for the pNFS Objects Layout Driver for NFSv4.1 pNFS (EXPERIMENTAL)"
+	depends on NFS_FS && NFS_V4_1 && SCSI_OSD_ULD
+	help
+	  Say M here if you want your pNFS client to support the Objects Layout Driver.
+	  Requires the SCSI osd initiator library (SCSI_OSD_INITIATOR) and
+	  upper level driver (SCSI_OSD_ULD).
+
+	  If unsure, say N.
+
 config ROOT_NFS
 	bool "Root file system on NFS"
 	depends on NFS_FS=y && IP_PNP
diff --git a/fs/nfs/Makefile b/fs/nfs/Makefile
index 7516a8a..6a34f7d 100644
--- a/fs/nfs/Makefile
+++ b/fs/nfs/Makefile
@@ -21,3 +21,5 @@ nfs-$(CONFIG_NFS_FSCACHE) += fscache.o fscache-index.o
 
 obj-$(CONFIG_PNFS_FILE_LAYOUT) += nfs_layout_nfsv41_files.o
 nfs_layout_nfsv41_files-y := nfs4filelayout.o nfs4filelayoutdev.o
+
+obj-$(CONFIG_PNFS_OBJLAYOUT) += objlayout/
diff --git a/fs/nfs/objlayout/Kbuild b/fs/nfs/objlayout/Kbuild
new file mode 100644
index 0000000..2e5b9a4
--- /dev/null
+++ b/fs/nfs/objlayout/Kbuild
@@ -0,0 +1,5 @@
+#
+# Makefile for the pNFS Objects Layout Driver kernel module
+#
+objlayoutdriver-y := objio_osd.o
+obj-$(CONFIG_PNFS_OBJLAYOUT) += objlayoutdriver.o
diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c
new file mode 100644
index 0000000..379595f
--- /dev/null
+++ b/fs/nfs/objlayout/objio_osd.c
@@ -0,0 +1,76 @@
+/*
+ *  pNFS Objects layout implementation over open-osd initiator library
+ *
+ *  Copyright (C) 2009 Panasas Inc. [year of first publication]
+ *  All rights reserved.
+ *
+ *  Benny Halevy <bhalevy@panasas.com>
+ *  Boaz Harrosh <bharrosh@panasas.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2
+ *  See the file COPYING included with this distribution for more details.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *  1. Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *  2. Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *  3. Neither the name of the Panasas company nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ *  DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ *  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ *  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <linux/module.h>
+#include "../pnfs.h"
+
+static struct pnfs_layoutdriver_type objlayout_type = {
+	.id = LAYOUT_OSD2_OBJECTS,
+	.name = "LAYOUT_OSD2_OBJECTS",
+};
+
+MODULE_DESCRIPTION("pNFS Layout Driver for OSD2 objects");
+MODULE_AUTHOR("Benny Halevy <bhalevy@panasas.com>");
+MODULE_LICENSE("GPL");
+
+static int __init
+objlayout_init(void)
+{
+	int ret = pnfs_register_layoutdriver(&objlayout_type);
+
+	if (ret)
+		printk(KERN_INFO
+			"%s: Registering OSD pNFS Layout Driver failed: error=%d\n",
+			__func__, ret);
+	else
+		printk(KERN_INFO "%s: Registered OSD pNFS Layout Driver\n",
+			__func__);
+	return ret;
+}
+
+static void __exit
+objlayout_exit(void)
+{
+	pnfs_unregister_layoutdriver(&objlayout_type);
+	printk(KERN_INFO "%s: Unregistered OSD pNFS Layout Driver\n",
+	       __func__);
+}
+
+module_init(objlayout_init);
+module_exit(objlayout_exit);
-- 
1.7.3.4


  parent reply	other threads:[~2011-05-25 21:28 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-25 21:24 [PATCHSET v8 0/32] pnfs for 2.6.40 Benny Halevy
2011-05-25 21:26 ` [PATCH v8 01/32] NFSv4.1: fix typo in filelayout_check_layout Benny Halevy
2011-05-25 21:26 ` [PATCH v8 02/32] NFSv4.1: use struct nfs_client to qualify deviceid Benny Halevy
2011-05-25 21:26 ` [PATCH v8 03/32] pnfs: resolve header dependency in pnfs.h Benny Halevy
2011-05-25 21:26 ` [PATCH v8 04/32] NFSv4.1: make deviceid cache global Benny Halevy
2011-05-25 21:27 ` [PATCH v8 05/32] NFSv4.1: purge deviceid cache on nfs_free_client Benny Halevy
2011-05-29  8:06   ` [PATCH] SQUASHME: into NFSv4.1: purge deviceid cache - let ver < 4.1 compile Boaz Harrosh
2011-05-25 21:27 ` [PATCH v8 06/32] pnfs: CB_NOTIFY_DEVICEID Benny Halevy
2011-05-25 21:27 ` [PATCH v8 07/32] NFSv4.1: use layout driver in global device cache Benny Halevy
2011-05-25 21:27 ` [PATCH v8 08/32] SUNRPC: introduce xdr_init_decode_pages Benny Halevy
2011-05-25 21:27 ` [PATCH v8 09/32] pnfs: Use byte-range for layoutget Benny Halevy
2011-05-25 21:27 ` [PATCH v8 10/32] pnfs: align layoutget requests on page boundaries Benny Halevy
2011-05-25 21:27 ` [PATCH v8 11/32] pnfs: Use byte-range for cb_layoutrecall Benny Halevy
2011-05-25 21:27 ` [PATCH v8 12/32] pnfs: client stats Benny Halevy
2011-05-25 21:28 ` Benny Halevy [this message]
2011-05-25 21:28 ` [PATCH v8 14/32] pnfs-obj: pnfs_osd XDR definitions Benny Halevy
2011-05-25 21:28 ` [PATCH v8 15/32] pnfs-obj: pnfs_osd XDR client implementation Benny Halevy
2011-05-25 21:28 ` [PATCH v8 16/32] pnfs-obj: decode layout, alloc/free lseg Benny Halevy
2011-05-26 19:05   ` [PATCH] SQUASHME V2: objio alloc/free lseg Bugs fixes Boaz Harrosh
2011-05-25 21:28 ` [PATCH v8 17/32] pnfs-obj: objio_osd device information retrieval and caching Benny Halevy
2011-05-26 14:04   ` Boaz Harrosh
2011-05-26 16:09     ` Benny Halevy
2011-05-26 19:07   ` [PATCH v9 16/18] " Boaz Harrosh
2011-05-26 19:09     ` Boaz Harrosh
2011-05-29 18:14     ` Benny Halevy
2011-05-25 21:28 ` [PATCH v8 18/32] pnfs: alloc and free layout_hdr layoutdriver methods Benny Halevy
2011-05-25 21:28 ` [PATCH v8 19/32] pnfs-obj: define per-inode private structure Benny Halevy
2011-05-25 21:28 ` [PATCH v8 20/32] pnfs: support for non-rpc layout drivers Benny Halevy
2011-05-25 21:29 ` [PATCH v8 21/32] pnfs-obj: osd raid engine read/write implementation Benny Halevy
2011-05-26 19:12   ` [PATCH resend3] SQUASHME: objio read/write patch: Bugs fixes Boaz Harrosh
2011-05-25 21:29 ` [PATCH v8 22/32] pnfs: layoutreturn Benny Halevy
2011-05-27 14:25   ` Boaz Harrosh
2011-05-25 21:29 ` [PATCH v8 23/32] pnfs: layoutret_on_setattr Benny Halevy
2011-05-25 21:29 ` [PATCH v8 24/32] pnfs: encode_layoutreturn Benny Halevy
2011-05-25 21:29 ` [PATCH v8 25/32] pnfs-obj: report errors and .encode_layoutreturn Implementation Benny Halevy
2011-05-26 19:14   ` Boaz Harrosh
2011-05-26 19:15   ` [PATCH v9 " Boaz Harrosh
2011-05-25 21:29 ` [PATCH v8 26/32] pnfs: encode_layoutcommit Benny Halevy
2011-05-25 21:29 ` [PATCH v8 27/32] pnfs-obj: objlayout_encode_layoutcommit implementation Benny Halevy
2011-05-25 21:29 ` [PATCH v8 28/32] NFSv4.1: unify pnfs_pageio_init functions Benny Halevy
2011-05-27 15:28   ` Boaz Harrosh
2011-05-27 15:37   ` [PATCH] SQUASHME: Fix BUG in: " Boaz Harrosh
2011-05-29  8:09     ` Boaz Harrosh
2011-05-29  8:10   ` [PATCH v2] " Boaz Harrosh
2011-05-25 21:30 ` [PATCH v8 29/32] NFSv4.1: change pg_test return type to bool Benny Halevy
2011-05-25 21:30 ` [PATCH v8 30/32] NFSv4.1: use pnfs_generic_pg_test directly by layout driver Benny Halevy
2011-05-25 21:30 ` [PATCH v8 31/32] NFSv4.1: define nfs_generic_pg_test Benny Halevy
2011-05-26 14:18   ` Boaz Harrosh
2011-05-26 18:20     ` Benny Halevy
2011-05-26 19:03       ` Boaz Harrosh
2011-05-26 19:17   ` Subject: [PATCH] SQUASHME: Move a check from nfs_pageio_do_add_request to nfs_generic_pg_test Boaz Harrosh
2011-05-26 19:58     ` Boaz Harrosh
2011-05-26 20:11       ` Trond Myklebust
2011-05-27  7:22         ` Boaz Harrosh
2011-05-25 21:30 ` [PATCH v8 32/32] pnfs-obj: pg_test check for max_io_size Benny Halevy
2011-05-26 14:57 ` [PATCHSET v8 0/32] pnfs for 2.6.40 Boaz Harrosh
2011-05-26 16:14   ` Benny Halevy
2011-05-29  8:56 ` Boaz Harrosh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1306358883-17258-1-git-send-email-bhalevy@panasas.com \
    --to=bhalevy@panasas.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=bharrosh@panasas.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.