diff options
author | Olga Kornievskaia <kolga@netapp.com> | 2017-05-08 18:02:24 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2017-05-08 19:01:06 -0400 |
commit | e092693443b995c8e3a565a73b5fdb05f1260f9b (patch) | |
tree | e3d20255e0cae9262b5950f3e86f78643a8ab7f4 /fs/nfs/write.c | |
parent | 28cf22d0ba283deccc30b71de5f34d222cf9aa4c (diff) | |
download | op-kernel-dev-e092693443b995c8e3a565a73b5fdb05f1260f9b.zip op-kernel-dev-e092693443b995c8e3a565a73b5fdb05f1260f9b.tar.gz |
NFS append COMMIT after synchronous COPY
Instead of messing with the commit path which has been causing issues,
add a COMMIT op after the COPY and ask for stable copies in the first
space.
It saves a round trip, since after the COPY, the client sends a COMMIT
anyway.
Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r-- | fs/nfs/write.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 59e21cc..85bfa41 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1742,36 +1742,6 @@ nfs_commit_list(struct inode *inode, struct list_head *head, int how, data->mds_ops, how, 0); } -int nfs_commit_file(struct file *file, struct nfs_write_verifier *verf) -{ - struct inode *inode = file_inode(file); - struct nfs_open_context *open; - struct nfs_commit_info cinfo; - struct nfs_page *req; - int ret; - - open = get_nfs_open_context(nfs_file_open_context(file)); - req = nfs_create_request(open, NULL, NULL, 0, i_size_read(inode)); - if (IS_ERR(req)) { - ret = PTR_ERR(req); - goto out_put; - } - - nfs_init_cinfo_from_inode(&cinfo, inode); - - memcpy(&req->wb_verf, verf, sizeof(struct nfs_write_verifier)); - nfs_request_add_commit_list(req, &cinfo); - ret = nfs_commit_inode(inode, FLUSH_SYNC); - if (ret > 0) - ret = 0; - - nfs_free_request(req); -out_put: - put_nfs_open_context(open); - return ret; -} -EXPORT_SYMBOL_GPL(nfs_commit_file); - /* * COMMIT call returned */ |