Skip to content

Commit e601937

Browse files
amschuma-ntapgregkh
authored andcommitted
NFS: Fix READ_PLUS when server doesn't support OP_READ_PLUS
commit f06d1b1 upstream. 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. Reported-by: Olga Kornievskaia <kolga@netapp.com> Fixes: c567552 ("NFS: Add READ_PLUS data segment support") Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Reviewed-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a54419e commit e601937

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfs/nfs4proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5441,7 +5441,7 @@ static bool nfs4_read_plus_not_supported(struct rpc_task *task,
54415441
struct rpc_message *msg = &task->tk_msg;
54425442

54435443
if (msg->rpc_proc == &nfs4_procedures[NFSPROC4_CLNT_READ_PLUS] &&
5444-
server->caps & NFS_CAP_READ_PLUS && task->tk_status == -ENOTSUPP) {
5444+
task->tk_status == -ENOTSUPP) {
54455445
server->caps &= ~NFS_CAP_READ_PLUS;
54465446
msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_READ];
54475447
rpc_restart_call_prepare(task);

0 commit comments

Comments
 (0)