mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
nfs: allow different protocol in nfs_initiate_commit
pnfs flexfile layout client may want to use NFSv3 ops rather than the default MDS v4 ops. Signed-off-by: Peng Tao <tao.peng@primarydata.com> Signed-off-by: Tom Haynes <Thomas.Haynes@primarydata.com>
This commit is contained in:
parent
abde71f4d3
commit
c36aae9ad9
4 changed files with 7 additions and 4 deletions
|
@ -1465,6 +1465,7 @@ void nfs_commitdata_release(struct nfs_commit_data *data)
|
|||
EXPORT_SYMBOL_GPL(nfs_commitdata_release);
|
||||
|
||||
int nfs_initiate_commit(struct rpc_clnt *clnt, struct nfs_commit_data *data,
|
||||
const struct nfs_rpc_ops *nfs_ops,
|
||||
const struct rpc_call_ops *call_ops,
|
||||
int how, int flags)
|
||||
{
|
||||
|
@ -1486,7 +1487,7 @@ int nfs_initiate_commit(struct rpc_clnt *clnt, struct nfs_commit_data *data,
|
|||
.priority = priority,
|
||||
};
|
||||
/* Set up the initial task struct. */
|
||||
NFS_PROTO(data->inode)->commit_setup(data, &msg);
|
||||
nfs_ops->commit_setup(data, &msg);
|
||||
|
||||
dprintk("NFS: %5u initiated commit call\n", data->task.tk_pid);
|
||||
|
||||
|
@ -1589,8 +1590,8 @@ nfs_commit_list(struct inode *inode, struct list_head *head, int how,
|
|||
/* Set up the argument struct */
|
||||
nfs_init_commit(data, head, NULL, cinfo);
|
||||
atomic_inc(&cinfo->mds->rpcs_out);
|
||||
return nfs_initiate_commit(NFS_CLIENT(inode), data, data->mds_ops,
|
||||
how, 0);
|
||||
return nfs_initiate_commit(NFS_CLIENT(inode), data, NFS_PROTO(inode),
|
||||
data->mds_ops, how, 0);
|
||||
out_bad:
|
||||
nfs_retry_commit(head, NULL, cinfo);
|
||||
cinfo->completion_ops->error_cleanup(NFS_I(inode));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue