Linux NFS development
 help / color / mirror / Atom feed
* [PATCH] NFSv4.2: fix COPY_NOTIFY xdr buf size calculation
@ 2024-12-13 16:52 Olga Kornievskaia
  2024-12-13 16:52 ` [PATCH] NFSv4.2: mark OFFLOAD_CANCEL MOVEABLE Olga Kornievskaia
  2024-12-13 16:52 ` [PATCH] NFSv4.2: make LAYOUTSTATS and LAYOUTERROR MOVEABLE Olga Kornievskaia
  0 siblings, 2 replies; 3+ messages in thread
From: Olga Kornievskaia @ 2024-12-13 16:52 UTC (permalink / raw)
  To: trondmy, anna; +Cc: linux-nfs, Olga Kornievskaia

We need to include sequence size in the compound.

Fixes: 0491567b51ef ("NFS: add COPY_NOTIFY operation")
Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
---
 fs/nfs/nfs42xdr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/nfs/nfs42xdr.c b/fs/nfs/nfs42xdr.c
index a928b7f90e59..b1b663468249 100644
--- a/fs/nfs/nfs42xdr.c
+++ b/fs/nfs/nfs42xdr.c
@@ -157,9 +157,11 @@
 					 decode_putfh_maxsz + \
 					 decode_offload_status_maxsz)
 #define NFS4_enc_copy_notify_sz		(compound_encode_hdr_maxsz + \
+					 encode_sequence_maxsz + \
 					 encode_putfh_maxsz + \
 					 encode_copy_notify_maxsz)
 #define NFS4_dec_copy_notify_sz		(compound_decode_hdr_maxsz + \
+					 decode_sequence_maxsz + \
 					 decode_putfh_maxsz + \
 					 decode_copy_notify_maxsz)
 #define NFS4_enc_deallocate_sz		(compound_encode_hdr_maxsz + \
-- 
2.43.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] NFSv4.2: mark OFFLOAD_CANCEL MOVEABLE
  2024-12-13 16:52 [PATCH] NFSv4.2: fix COPY_NOTIFY xdr buf size calculation Olga Kornievskaia
@ 2024-12-13 16:52 ` Olga Kornievskaia
  2024-12-13 16:52 ` [PATCH] NFSv4.2: make LAYOUTSTATS and LAYOUTERROR MOVEABLE Olga Kornievskaia
  1 sibling, 0 replies; 3+ messages in thread
From: Olga Kornievskaia @ 2024-12-13 16:52 UTC (permalink / raw)
  To: trondmy, anna; +Cc: linux-nfs, Olga Kornievskaia

OFFLOAD_CANCEL should be marked MOVEABLE for when we need to move
tasks off a non-functional transport.

Fixes: c975c2092657 ("NFS send OFFLOAD_CANCEL when COPY killed")
Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
---
 fs/nfs/nfs42proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
index 82efaf8720e4..c5b72dc71d7f 100644
--- a/fs/nfs/nfs42proc.c
+++ b/fs/nfs/nfs42proc.c
@@ -602,7 +602,7 @@ static int nfs42_do_offload_cancel_async(struct file *dst,
 		.rpc_message = &msg,
 		.callback_ops = &nfs42_offload_cancel_ops,
 		.workqueue = nfsiod_workqueue,
-		.flags = RPC_TASK_ASYNC,
+		.flags = RPC_TASK_ASYNC | RPC_TASK_MOVEABLE,
 	};
 	int status;
 
-- 
2.43.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] NFSv4.2: make LAYOUTSTATS and LAYOUTERROR MOVEABLE
  2024-12-13 16:52 [PATCH] NFSv4.2: fix COPY_NOTIFY xdr buf size calculation Olga Kornievskaia
  2024-12-13 16:52 ` [PATCH] NFSv4.2: mark OFFLOAD_CANCEL MOVEABLE Olga Kornievskaia
@ 2024-12-13 16:52 ` Olga Kornievskaia
  1 sibling, 0 replies; 3+ messages in thread
From: Olga Kornievskaia @ 2024-12-13 16:52 UTC (permalink / raw)
  To: trondmy, anna; +Cc: linux-nfs, Olga Kornievskaia

LAYOUTSTATS and LAYOUTERROR should be marked MOVEABLE for when we
need to move tasks off a non-functional transport.

Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
---
 fs/nfs/nfs42proc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
index c5b72dc71d7f..49216f9cf5ad 100644
--- a/fs/nfs/nfs42proc.c
+++ b/fs/nfs/nfs42proc.c
@@ -1028,7 +1028,7 @@ int nfs42_proc_layoutstats_generic(struct nfs_server *server,
 		.rpc_message = &msg,
 		.callback_ops = &nfs42_layoutstat_ops,
 		.callback_data = data,
-		.flags = RPC_TASK_ASYNC,
+		.flags = RPC_TASK_ASYNC | RPC_TASK_MOVEABLE,
 	};
 	struct rpc_task *task;
 
@@ -1183,7 +1183,7 @@ int nfs42_proc_layouterror(struct pnfs_layout_segment *lseg,
 	struct rpc_task_setup task_setup = {
 		.rpc_message = &msg,
 		.callback_ops = &nfs42_layouterror_ops,
-		.flags = RPC_TASK_ASYNC,
+		.flags = RPC_TASK_ASYNC | RPC_TASK_MOVEABLE,
 	};
 	unsigned int i;
 
-- 
2.43.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-13 16:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-13 16:52 [PATCH] NFSv4.2: fix COPY_NOTIFY xdr buf size calculation Olga Kornievskaia
2024-12-13 16:52 ` [PATCH] NFSv4.2: mark OFFLOAD_CANCEL MOVEABLE Olga Kornievskaia
2024-12-13 16:52 ` [PATCH] NFSv4.2: make LAYOUTSTATS and LAYOUTERROR MOVEABLE Olga Kornievskaia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox