Commit 1c787096 authored by Trond Myklebust's avatar Trond Myklebust

NFSv4.1: Use more sensible names for 'initialize_mountpoint'

The initialize_mountpoint/uninitialise_mountpoint functions are really about
setting or clearing the layout driver to be used on this filesystem. Change
the names to the more descriptive 'set_layoutdriver/clear_layoutdriver'.
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 16b374ca
...@@ -40,8 +40,8 @@ MODULE_LICENSE("GPL"); ...@@ -40,8 +40,8 @@ MODULE_LICENSE("GPL");
MODULE_AUTHOR("Dean Hildebrand <dhildebz@umich.edu>"); MODULE_AUTHOR("Dean Hildebrand <dhildebz@umich.edu>");
MODULE_DESCRIPTION("The NFSv4 file layout driver"); MODULE_DESCRIPTION("The NFSv4 file layout driver");
int static int
filelayout_initialize_mountpoint(struct nfs_server *nfss) filelayout_set_layoutdriver(struct nfs_server *nfss)
{ {
int status = pnfs_alloc_init_deviceid_cache(nfss->nfs_client, int status = pnfs_alloc_init_deviceid_cache(nfss->nfs_client,
nfs4_fl_free_deviceid_callback); nfs4_fl_free_deviceid_callback);
...@@ -55,9 +55,9 @@ filelayout_initialize_mountpoint(struct nfs_server *nfss) ...@@ -55,9 +55,9 @@ filelayout_initialize_mountpoint(struct nfs_server *nfss)
return 0; return 0;
} }
/* Uninitialize a mountpoint by destroying its device list */ /* Clear out the layout by destroying its device list */
int static int
filelayout_uninitialize_mountpoint(struct nfs_server *nfss) filelayout_clear_layoutdriver(struct nfs_server *nfss)
{ {
dprintk("--> %s\n", __func__); dprintk("--> %s\n", __func__);
...@@ -256,8 +256,8 @@ static struct pnfs_layoutdriver_type filelayout_type = { ...@@ -256,8 +256,8 @@ static struct pnfs_layoutdriver_type filelayout_type = {
.id = LAYOUT_NFSV4_1_FILES, .id = LAYOUT_NFSV4_1_FILES,
.name = "LAYOUT_NFSV4_1_FILES", .name = "LAYOUT_NFSV4_1_FILES",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.initialize_mountpoint = filelayout_initialize_mountpoint, .set_layoutdriver = filelayout_set_layoutdriver,
.uninitialize_mountpoint = filelayout_uninitialize_mountpoint, .clear_layoutdriver = filelayout_clear_layoutdriver,
.alloc_lseg = filelayout_alloc_lseg, .alloc_lseg = filelayout_alloc_lseg,
.free_lseg = filelayout_free_lseg, .free_lseg = filelayout_free_lseg,
}; };
......
...@@ -75,7 +75,7 @@ void ...@@ -75,7 +75,7 @@ void
unset_pnfs_layoutdriver(struct nfs_server *nfss) unset_pnfs_layoutdriver(struct nfs_server *nfss)
{ {
if (nfss->pnfs_curr_ld) { if (nfss->pnfs_curr_ld) {
nfss->pnfs_curr_ld->uninitialize_mountpoint(nfss); nfss->pnfs_curr_ld->clear_layoutdriver(nfss);
module_put(nfss->pnfs_curr_ld->owner); module_put(nfss->pnfs_curr_ld->owner);
} }
nfss->pnfs_curr_ld = NULL; nfss->pnfs_curr_ld = NULL;
...@@ -115,7 +115,7 @@ set_pnfs_layoutdriver(struct nfs_server *server, u32 id) ...@@ -115,7 +115,7 @@ set_pnfs_layoutdriver(struct nfs_server *server, u32 id)
goto out_no_driver; goto out_no_driver;
} }
server->pnfs_curr_ld = ld_type; server->pnfs_curr_ld = ld_type;
if (ld_type->initialize_mountpoint(server)) { if (ld_type->set_layoutdriver(server)) {
printk(KERN_ERR printk(KERN_ERR
"%s: Error initializing mount point for layout driver %u.\n", "%s: Error initializing mount point for layout driver %u.\n",
__func__, id); __func__, id);
......
...@@ -53,8 +53,8 @@ struct pnfs_layoutdriver_type { ...@@ -53,8 +53,8 @@ struct pnfs_layoutdriver_type {
const u32 id; const u32 id;
const char *name; const char *name;
struct module *owner; struct module *owner;
int (*initialize_mountpoint) (struct nfs_server *); int (*set_layoutdriver) (struct nfs_server *);
int (*uninitialize_mountpoint) (struct nfs_server *); int (*clear_layoutdriver) (struct nfs_server *);
struct pnfs_layout_segment * (*alloc_lseg) (struct pnfs_layout_hdr *layoutid, struct nfs4_layoutget_res *lgr); struct pnfs_layout_segment * (*alloc_lseg) (struct pnfs_layout_hdr *layoutid, struct nfs4_layoutget_res *lgr);
void (*free_lseg) (struct pnfs_layout_segment *lseg); void (*free_lseg) (struct pnfs_layout_segment *lseg);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment