NFS: Fix READ_PLUS when server doesn't support OP_READ_PLUS
Subsystems (2)
Anna Schumaker
maintainerPATCH 1/1 NFS: Fix READ_PLUS when server doesn't support OP_READ_PLUS
From: Anna Schumaker <[email protected]>
Olga showed me a case where the client was sending multiple READ_PLUS calls to the server in parallel, and the server replied NFS4ERR_OPNOTSUPP to each. The client would fall back to READ for the first reply, but fail to retry the other calls.
I fix this by removing the test for NFS_CAP_READ_PLUS in nfs4_read_plus_not_supported(). This allows us to reschedule any READ_PLUS call that has a NFS4ERR_OPNOTSUPP return value, even after the capability has been cleared.
--- fs/nfs/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/nfs4proc.c +1 -1
@@ -5456,7 +5456,7 @@ static bool nfs4_read_plus_not_supported(struct rpc_task *task,struct rpc_message *msg = &task->tk_msg;if (msg->rpc_proc == &nfs4_procedures[NFSPROC4_CLNT_READ_PLUS ] && - server->caps &NFS_CAP_READ_PLUS && task->tk_status == -ENOTSUPP ) { + task->tk_status == -ENOTSUPP ) { server->caps &= ~NFS_CAP_READ_PLUS ; msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_READ ];rpc_restart_call_prepare (task);
Signature · 1 line
2.44.0
Quoted 12 lines · Anna Schumaker
From: Anna Schumaker <[email protected]>
Olga showed me a case where the client was sending multiple
READ_PLUScalls to the server in parallel, and the server repliedNFS4ERR_OPNOTSUPPto each. The client would fall back to READ for the first reply, but fail to retry the other calls.I fix this by removing the test for
NFS_CAP_READ_PLUSinnfs4_read_plus_not_supported(). This allows us to reschedule anyREAD_PLUScall that has aNFS4ERR_OPNOTSUPPreturn value, even after the capability has been cleared.
Quoted 4 lines
Reported-by Olga Kornievskaia <[email protected]>Fixes c567552612ec ("NFS: Add READ_PLUS data segment support")Cc [email protected] # v5.10+Signed-off-by Anna Schumaker <[email protected]>
Ben
Quoted 19 lines
--- fs/nfs/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/nfs/nfs4proc.c +1
-1@@ -5456,7 +5456,7 @@ static bool nfs4_read_plus_not_supported(struct rpc_task *task,struct rpc_message *msg = &task->tk_msg;if (msg->rpc_proc == &nfs4_procedures[NFSPROC4_CLNT_READ_PLUS ] && - server->caps &NFS_CAP_READ_PLUS && task->tk_status == -ENOTSUPP ) { + task->tk_status == -ENOTSUPP ) { server->caps &= ~NFS_CAP_READ_PLUS ; msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_READ ];rpc_restart_call_prepare (task);Signature · 1 line
2.44.0