Skip to content

Commit f06d1b1

Browse files
amschuma-ntapTrond Myklebust
authored andcommitted
NFS: Fix READ_PLUS when server doesn't support OP_READ_PLUS
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 <[email protected]> Fixes: c567552 ("NFS: Add READ_PLUS data segment support") Cc: [email protected] # v5.10+ Signed-off-by: Anna Schumaker <[email protected]> Reviewed-by: Benjamin Coddington <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent 0dc9f43 commit f06d1b1

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
@@ -5456,7 +5456,7 @@ static bool nfs4_read_plus_not_supported(struct rpc_task *task,
54565456
struct rpc_message *msg = &task->tk_msg;
54575457

54585458
if (msg->rpc_proc == &nfs4_procedures[NFSPROC4_CLNT_READ_PLUS] &&
5459-
server->caps & NFS_CAP_READ_PLUS && task->tk_status == -ENOTSUPP) {
5459+
task->tk_status == -ENOTSUPP) {
54605460
server->caps &= ~NFS_CAP_READ_PLUS;
54615461
msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_READ];
54625462
rpc_restart_call_prepare(task);

0 commit comments

Comments
 (0)