android_kernel_xiaomi_sm8350/fs/afs
David Howells 1c1d4830a9 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@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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:23:03 +01:00
..
addr_list.c
afs_cm.h
afs_fs.h
afs_vl.h
afs.h
cache.c
callback.c
cell.c
cmservice.c
dir_edit.c
dir_silly.c
dir.c
dynroot.c
file.c
flock.c afs: Use the operation issue time instead of the reply time for callbacks 2022-09-15 12:04:55 +02:00
fs_probe.c afs: Fix fileserver probe RTT handling 2022-12-08 11:23:03 +01:00
fsclient.c afs: Use the operation issue time instead of the reply time for callbacks 2022-09-15 12:04:55 +02:00
inode.c afs: Fix dynamic root getattr 2022-06-29 08:58:46 +02:00
internal.h afs: Use the operation issue time instead of the reply time for callbacks 2022-09-15 12:04:55 +02:00
Kconfig
main.c
Makefile
misc.c afs: Return -EAGAIN, not -EREMOTEIO, when a file already locked 2022-09-28 11:03:59 +02:00
mntpt.c
proc.c
protocol_uae.h
protocol_yfs.h
rotate.c
rxrpc.c afs: Use the operation issue time instead of the reply time for callbacks 2022-09-15 12:04:55 +02:00
security.c
server_list.c
server.c
super.c
vl_list.c
vl_probe.c
vl_rotate.c
vlclient.c
volume.c
write.c
xattr.c
xdr_fs.h
yfsclient.c afs: Use the operation issue time instead of the reply time for callbacks 2022-09-15 12:04:55 +02:00