Skip to content

Commit

Permalink
afs: Don't skip server addresses for which we didn't get an RTT reading
Browse files Browse the repository at this point in the history
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
  • Loading branch information
David Howells committed Dec 24, 2023
1 parent 72904d7 commit a2aff7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/afs/rotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ bool afs_select_fileserver(struct afs_operation *op)
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;
}
Expand Down
2 changes: 1 addition & 1 deletion fs/afs/vl_rotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ bool afs_select_vlserver(struct afs_vl_cursor *vc)
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;
}
Expand Down

0 comments on commit a2aff7b

Please sign in to comment.