-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NFSv4.1: pnfs: filelayout: introduce minimal file layout driver
This driver just registers itself and supplies trivial mount/umount functions. Signed-off-by: Dean Hildebrand <dhildebz@umich.edu> Signed-off-by: Marc Eshel <eshel@almaden.ibm.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Fred Isaman <iisaman@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
- Loading branch information
Dean Hildebrand
authored and
Trond Myklebust
committed
Oct 24, 2010
1 parent
02c35fc
commit 7ab672c
Showing
3 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/* | ||
* Module for the pnfs nfs4 file layout driver. | ||
* Defines all I/O and Policy interface operations, plus code | ||
* to register itself with the pNFS client. | ||
* | ||
* Copyright (c) 2002 | ||
* The Regents of the University of Michigan | ||
* All Rights Reserved | ||
* | ||
* Dean Hildebrand <dhildebz@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 or warranty | ||
* of any kind either express or implied, including without limitation | ||
* the implied warranties of merchantability, fitness for a particular | ||
* purpose, or noninfringement. 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 of 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/nfs_fs.h> | ||
#include "pnfs.h" | ||
|
||
#define NFSDBG_FACILITY NFSDBG_PNFS_LD | ||
|
||
MODULE_LICENSE("GPL"); | ||
MODULE_AUTHOR("Dean Hildebrand <dhildebz@umich.edu>"); | ||
MODULE_DESCRIPTION("The NFSv4 file layout driver"); | ||
|
||
int | ||
filelayout_initialize_mountpoint(struct nfs_server *nfss) | ||
{ | ||
return 0; | ||
} | ||
|
||
int | ||
filelayout_uninitialize_mountpoint(struct nfs_server *nfss) | ||
{ | ||
dprintk("--> %s\n", __func__); | ||
|
||
return 0; | ||
} | ||
|
||
static struct pnfs_layoutdriver_type filelayout_type = { | ||
.id = LAYOUT_NFSV4_1_FILES, | ||
.name = "LAYOUT_NFSV4_1_FILES", | ||
.owner = THIS_MODULE, | ||
.initialize_mountpoint = filelayout_initialize_mountpoint, | ||
.uninitialize_mountpoint = filelayout_uninitialize_mountpoint, | ||
}; | ||
|
||
static int __init nfs4filelayout_init(void) | ||
{ | ||
printk(KERN_INFO "%s: NFSv4 File Layout Driver Registering...\n", | ||
__func__); | ||
return pnfs_register_layoutdriver(&filelayout_type); | ||
} | ||
|
||
static void __exit nfs4filelayout_exit(void) | ||
{ | ||
printk(KERN_INFO "%s: NFSv4 File Layout Driver Unregistering...\n", | ||
__func__); | ||
pnfs_unregister_layoutdriver(&filelayout_type); | ||
} | ||
|
||
module_init(nfs4filelayout_init); | ||
module_exit(nfs4filelayout_exit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters