afs: Don't skip server addresses for which we didn't get an RTT reading
authorDavid Howells <dhowells@redhat.com>
Mon, 30 Oct 2023 16:40:57 +0000 (16:40 +0000)
committerDavid Howells <dhowells@redhat.com>
Sun, 24 Dec 2023 15:22:51 +0000 (15:22 +0000)
In the rotation algorithms for iterating over volume location servers and
file servers, don't skip servers from which we got a valid response to a
probe (either a reply DATA packet or an ABORT) even if we didn't manage to
get an RTT reading.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org

fs/afs/rotate.c
fs/afs/vl_rotate.c

index 59aed7a6dd115e955834d65e62c61f26cce59795..d420f073300b78ef02aa405493fe37fb4f4730b0 100644 (file)
@@ -427,7 +427,7 @@ pick_server:
                if (!test_bit(i, &op->untried) ||
                    !test_bit(AFS_SERVER_FL_RESPONDING, &s->flags))
                        continue;
-               if (s->probe.rtt < rtt) {
+               if (s->probe.rtt <= rtt) {
                        op->index = i;
                        rtt = s->probe.rtt;
                }
index f8f255c966ae1752013bbba913c178c51de0de60..6aaa2e4733ec5d518095eb99b7a2f41631e54767 100644 (file)
@@ -201,7 +201,7 @@ pick_server:
                if (!test_bit(i, &vc->untried) ||
                    !test_bit(AFS_VLSERVER_FL_RESPONDING, &s->flags))
                        continue;
-               if (s->probe.rtt < rtt) {
+               if (s->probe.rtt <= rtt) {
                        vc->index = i;
                        rtt = s->probe.rtt;
                }