[PATCH 1/1] NFSv4.1 mark qualified async operations as MOVEABLE tasks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Olga Kornievskaia <kolga@xxxxxxxxxx>

Mark async operations such as RENAME, REMOVE, COMMIT MOVEABLE
for the nfsv4.1+ sessions.

Fixes: 85e39feead948 ("NFSv4.1 identify and mark RPC tasks that can move between transports")
Signed-off-by: Olga Kornievskaia <kolga@xxxxxxxxxx>
---
 fs/nfs/nfs4proc.c | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 16106f805ffa..f593bad996af 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4780,7 +4780,11 @@ static void nfs4_proc_unlink_setup(struct rpc_message *msg,
 
 static void nfs4_proc_unlink_rpc_prepare(struct rpc_task *task, struct nfs_unlinkdata *data)
 {
-	nfs4_setup_sequence(NFS_SB(data->dentry->d_sb)->nfs_client,
+	struct nfs_client *clp = NFS_SB(data->dentry->d_sb)->nfs_client;
+
+	if (clp->cl_minorversion)
+		task->tk_flags |= RPC_TASK_MOVEABLE;
+	nfs4_setup_sequence(clp,
 			&data->args.seq_args,
 			&data->res.seq_res,
 			task);
@@ -4823,7 +4827,11 @@ static void nfs4_proc_rename_setup(struct rpc_message *msg,
 
 static void nfs4_proc_rename_rpc_prepare(struct rpc_task *task, struct nfs_renamedata *data)
 {
-	nfs4_setup_sequence(NFS_SERVER(data->old_dir)->nfs_client,
+	struct nfs_client *clp = NFS_SERVER(data->old_dir)->nfs_client;
+
+	if (clp->cl_minorversion)
+		task->tk_flags |= RPC_TASK_MOVEABLE;
+	nfs4_setup_sequence(clp,
 			&data->args.seq_args,
 			&data->res.seq_res,
 			task);
@@ -5457,7 +5465,11 @@ static void nfs4_proc_read_setup(struct nfs_pgio_header *hdr,
 static int nfs4_proc_pgio_rpc_prepare(struct rpc_task *task,
 				      struct nfs_pgio_header *hdr)
 {
-	if (nfs4_setup_sequence(NFS_SERVER(hdr->inode)->nfs_client,
+	struct nfs_client *clp = NFS_SERVER(hdr->inode)->nfs_client;
+
+	if (clp->cl_minorversion)
+		task->tk_flags |= RPC_TASK_MOVEABLE;
+	if (nfs4_setup_sequence(clp,
 			&hdr->args.seq_args,
 			&hdr->res.seq_res,
 			task))
@@ -5595,7 +5607,11 @@ static void nfs4_proc_write_setup(struct nfs_pgio_header *hdr,
 
 static void nfs4_proc_commit_rpc_prepare(struct rpc_task *task, struct nfs_commit_data *data)
 {
-	nfs4_setup_sequence(NFS_SERVER(data->inode)->nfs_client,
+	struct nfs_client *clp = NFS_SERVER(data->inode)->nfs_client;
+
+	if (clp->cl_minorversion)
+		task->tk_flags |= RPC_TASK_MOVEABLE;
+	nfs4_setup_sequence(clp,
 			&data->args.seq_args,
 			&data->res.seq_res,
 			task);
-- 
2.27.0




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux