Skip to contentSkip to conversation

NFSv4.1: Don't decrease the value of seq_nr_highest_sent

PATCH New [email protected] 1 participant 2 messages Jul 13, 2022

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/2 NFSv4.1: Don't decrease the value of seq_nr_highest_sent

From: Trond Myklebust <[email protected]>

When we're trying to figure out what the server may or may not have seen in terms of request numbers, do not assume that requests with a larger number were missed, just because we saw a reply to a request with a smaller number.

Fixes 3453d5708b33 ("NFSv4.1: Avoid false retries when RPC calls are interrupted")
---
 fs/nfs/nfs4proc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
fs/nfs/nfs4proc.c +2 -3
index bb0e84a46d61..628471d06947 100644
@@ -784,10 +784,9 @@ static void nfs4_slot_sequence_record_sent(struct nfs4_slot *slot,
 	if ((s32)(seqnr - slot->seq_nr_highest_sent) > 0)
 		slot->seq_nr_highest_sent = seqnr;
 }
-static void nfs4_slot_sequence_acked(struct nfs4_slot *slot,
-		u32 seqnr)
+static void nfs4_slot_sequence_acked(struct nfs4_slot *slot, u32 seqnr)
 {
-	slot->seq_nr_highest_sent = seqnr;
+	nfs4_slot_sequence_record_sent(slot, seqnr);
 	slot->seq_nr_last_acked = seqnr;
 }
 
Signature · 1 line
2.36.1
author maintainer
#1 lore raw

PATCH 2/2 NFSv4.1: Handle NFS4ERR_DELAY replies to OP_SEQUENCE correctly

From: Trond Myklebust <[email protected]>

Don't assume that the NFS4ERR_DELAY means that the server is processing this slot id.

Fixes 3453d5708b33 ("NFSv4.1: Avoid false retries when RPC calls are interrupted")
---
 fs/nfs/nfs4proc.c | 1 -
 1 file changed, 1 deletion(-)
fs/nfs/nfs4proc.c +0 -1
index 628471d06947..4e0dcc19ca71 100644
@@ -853,7 +853,6 @@ static int nfs41_sequence_process(struct rpc_task *task,
 			__func__,
 			slot->slot_nr,
 			slot->seq_nr);
-		nfs4_slot_sequence_acked(slot, slot->seq_nr);
 		goto out_retry;
 	case -NFS4ERR_RETRY_UNCACHED_REP:
 	case -NFS4ERR_SEQ_FALSE_RETRY:
Signature · 1 line
2.36.1