NFS: Convert v3 into a module
This patch exports symbols and moves over the final structures needed by the v3 module. In addition, I also switch over to using IS_ENABLED() to check if CONFIG_NFS_V3 or CONFIG_NFS_V3_MODULE are set. The module (nfs3.ko) will be created in the same directory as nfs.ko and will be automatically loaded the first time you try to mount over NFS v3. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
committed by
Trond Myklebust
parent
ddda8e0aa8
commit
1c606fb74c
@@ -446,7 +446,7 @@ nfs_mark_request_dirty(struct nfs_page *req)
|
||||
__set_page_dirty_nobuffers(req->wb_page);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
|
||||
#if IS_ENABLED(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
|
||||
/**
|
||||
* nfs_request_add_commit_list - add request to a commit list
|
||||
* @req: pointer to a struct nfs_page
|
||||
@@ -636,7 +636,7 @@ out:
|
||||
hdr->release(hdr);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
|
||||
#if IS_ENABLED(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
|
||||
static unsigned long
|
||||
nfs_reqs_to_commit(struct nfs_commit_info *cinfo)
|
||||
{
|
||||
@@ -1298,7 +1298,7 @@ void nfs_writeback_done(struct rpc_task *task, struct nfs_write_data *data)
|
||||
return;
|
||||
nfs_add_stats(inode, NFSIOS_SERVERWRITTENBYTES, resp->count);
|
||||
|
||||
#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
|
||||
#if IS_ENABLED(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
|
||||
if (resp->verf->committed < argp->stable && task->tk_status >= 0) {
|
||||
/* We tried a write call, but the server did not
|
||||
* commit data to stable storage even though we
|
||||
@@ -1358,7 +1358,7 @@ void nfs_writeback_done(struct rpc_task *task, struct nfs_write_data *data)
|
||||
}
|
||||
|
||||
|
||||
#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
|
||||
#if IS_ENABLED(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
|
||||
static int nfs_commit_set_lock(struct nfs_inode *nfsi, int may_wait)
|
||||
{
|
||||
int ret;
|
||||
|
||||
Reference in New Issue
Block a user