Patch "afs: Fix fileserver probe RTT handling" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    afs: Fix fileserver probe RTT handling

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     afs-fix-fileserver-probe-rtt-handling.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit edd8723c537501fe4015d189efe901fc0433180c
Author: David Howells <dhowells@xxxxxxxxxx>
Date:   Mon Nov 28 22:02:56 2022 +0000

    afs: Fix fileserver probe RTT handling
    
    [ Upstream commit ca57f02295f188d6c65ec02202402979880fa6d8 ]
    
    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: 1d4adfaf6574 ("rxrpc: Make rxrpc_kernel_get_srtt() indicate validity")
    Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
    Reviewed-by: Marc Dionne <marc.dionne@xxxxxxxxxxxx>
    Tested-by: Marc Dionne <marc.dionne@xxxxxxxxxxxx>
    cc: linux-afs@xxxxxxxxxxxxxxxxxxx
    Link: https://lore.kernel.org/r/166965503999.3392585.13954054113218099395.stgit@xxxxxxxxxxxxxxxxxxxxxx/
    Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/afs/fs_probe.c b/fs/afs/fs_probe.c
index e7e98ad63a91..04d42e49fc59 100644
--- a/fs/afs/fs_probe.c
+++ b/fs/afs/fs_probe.c
@@ -161,8 +161,8 @@ void afs_fileserver_probe_result(struct afs_call *call)
 		}
 	}
 
-	if (rxrpc_kernel_get_srtt(call->net->socket, call->rxcall, &rtt_us) &&
-	    rtt_us < server->probe.rtt) {
+	rxrpc_kernel_get_srtt(call->net->socket, call->rxcall, &rtt_us);
+	if (rtt_us < server->probe.rtt) {
 		server->probe.rtt = rtt_us;
 		server->rtt = rtt_us;
 		alist->preferred = index;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux