Skip to content

Commit 8c69261

Browse files
committed
afs: Fix fileserver probe RTT handling
jira LE-1907 Rebuild_History Non-Buildable kernel-rt-5.14.0-284.30.1.rt14.315.el9_2 commit-author David Howells <dhowells@redhat.com> commit ca57f02 The fileserver probing code attempts to work out the best fileserver to use for a volume by retrieving the RTT calculated by AF_RXRPC for the probe call sent to each server and comparing them. Sometimes, however, no RTT estimate is available and rxrpc_kernel_get_srtt() returns false, leading good fileservers to be given an RTT of UINT_MAX and thus causing the rotation algorithm to ignore them. Fix afs_select_fileserver() to ignore rxrpc_kernel_get_srtt()'s return value and just take the estimated RTT it provides - which will be capped at 1 second. Fixes: 1d4adfa ("rxrpc: Make rxrpc_kernel_get_srtt() indicate validity") Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Marc Dionne <marc.dionne@auristor.com> Tested-by: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/166965503999.3392585.13954054113218099395.stgit@warthog.procyon.org.uk/ Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit ca57f02) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 1a5c1b1 commit 8c69261

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/afs/fs_probe.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ void afs_fileserver_probe_result(struct afs_call *call)
167167
clear_bit(AFS_SERVER_FL_HAS_FS64, &server->flags);
168168
}
169169

170-
if (rxrpc_kernel_get_srtt(call->net->socket, call->rxcall, &rtt_us) &&
171-
rtt_us < server->probe.rtt) {
170+
rxrpc_kernel_get_srtt(call->net->socket, call->rxcall, &rtt_us);
171+
if (rtt_us < server->probe.rtt) {
172172
server->probe.rtt = rtt_us;
173173
server->rtt = rtt_us;
174174
alist->preferred = index;

0 commit comments

Comments
 (0)