Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252896
b: refs/heads/master
c: c93407d
h: refs/heads/master
v: v3
  • Loading branch information
Benny Halevy authored and Boaz Harrosh committed May 29, 2011
1 parent fb879d0 commit bad4245
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ae50c0b5c6f6fa340f1fe2d244b358145f7e5a15
refs/heads/master: c93407d03c3ccf60b33a309e5fcd41cd98969901
10 changes: 10 additions & 0 deletions trunk/fs/nfs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/nfs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
5 changes: 5 additions & 0 deletions trunk/fs/nfs/objlayout/Kbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#
# Makefile for the pNFS Objects Layout Driver kernel module
#
objlayoutdriver-y := objio_osd.o
obj-$(CONFIG_PNFS_OBJLAYOUT) += objlayoutdriver.o
76 changes: 76 additions & 0 deletions trunk/fs/nfs/objlayout/objio_osd.c
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit bad4245

Please sign in to comment.