linux/fs/afs
David Howells da0e01cc70
afs: Fix fileserver rotation getting stuck
Fix the fileserver rotation code in a couple of ways:

 (1) op->server_states is an array, not a pointer to a single record, so
     fix the places that access it to index it.

 (2) In the places that go through an address list to work out which one
     has the best priority, fix the loops to skip known failed addresses.

Without this, the rotation algorithm may get stuck on addresses that are
inaccessible or don't respond.

This can be triggered manually by finding a server that advertises a
non-routable address and giving it a higher priority, eg.:

        echo "add udp 192.168.0.0/16 3000" >/proc/fs/afs/addr_prefs

if the server, say, includes the address 192.168.7.7 in its address list,
and then attempting to access a volume on that server.

Fixes: 495f2ae9e3 ("afs: Fix fileserver rotation")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Link: https://lore.kernel.org/r/4005300.1712309731@warthog.procyon.org.uk/ # v1
Link: https://lore.kernel.org/r/998836.1714746152@warthog.procyon.org.uk
Signed-off-by: Christian Brauner <brauner@kernel.org>
2024-05-10 08:49:17 +02:00
..
addr_list.c afs: Remove the unimplemented afs_cmp_addr_list() 2024-01-01 16:37:26 +00:00
addr_prefs.c afs: Mark address lists with configured priorities 2024-01-01 16:37:27 +00:00
afs.h afs: Parse the VolSync record in the reply of a number of RPC ops 2024-01-01 16:37:27 +00:00
afs_cm.h
afs_fs.h
afs_vl.h
callback.c afs: Overhaul invalidation handling to better support RO volumes 2024-01-01 16:37:27 +00:00
cell.c afs: Overhaul invalidation handling to better support RO volumes 2024-01-01 16:37:27 +00:00
cmservice.c rxrpc, afs: Allow afs to pin rxrpc_peer objects 2023-12-24 15:22:50 +00:00
dir.c afs: Revert "afs: Hide silly-rename files from userspace" 2024-03-14 11:51:08 +01:00
dir_edit.c
dir_silly.c afs: Simplify error handling 2023-12-24 15:22:53 +00:00
dynroot.c afs: Remove afs_dynroot_d_revalidate() as it is redundant 2024-01-22 22:30:14 +00:00
file.c afs: fix __afs_break_callback() / afs_drop_open_mmap() race 2024-02-25 02:10:31 -05:00
flock.c afs: adapt to breakup of struct file_lock 2024-02-05 13:11:42 +01:00
fs_operation.c afs: Fix fileserver rotation 2024-01-01 16:37:27 +00:00
fs_probe.c afs: Fix fileserver rotation 2024-01-01 16:37:27 +00:00
fsclient.c afs: trace: Log afs_make_call(), including server address 2024-01-01 16:37:27 +00:00
inode.c vfs-6.8.netfs 2024-01-19 09:10:23 -08:00
internal.h afs: Fix ignored callbacks over ipv4 2024-02-20 09:51:21 +01:00
Kconfig
main.c afs: Fix ignored callbacks over ipv4 2024-02-20 09:51:21 +01:00
Makefile afs: Move the vnode/volume validity checking code into its own file 2024-01-01 16:37:27 +00:00
misc.c afs: Simplify error handling 2023-12-24 15:22:53 +00:00
mntpt.c
proc.c afs: Fix missing/incorrect unlocking of RCU read lock 2024-01-22 22:30:38 +00:00
protocol_afs.h
protocol_uae.h
protocol_yfs.h
rotate.c afs: Fix fileserver rotation getting stuck 2024-05-10 08:49:17 +02:00
rxrpc.c afs: trace: Log afs_make_call(), including server address 2024-01-01 16:37:27 +00:00
security.c
server.c afs: Fix ignored callbacks over ipv4 2024-02-20 09:51:21 +01:00
server_list.c afs: Fix fileserver rotation 2024-01-01 16:37:27 +00:00
super.c vfs-6.8.netfs 2024-01-19 09:10:23 -08:00
validation.c afs: Fix occasional rmdir-then-VNOVNODE with generic/011 2024-03-14 12:13:21 +01:00
vl_alias.c afs: Defer volume record destruction to a workqueue 2024-01-01 16:37:27 +00:00
vl_list.c afs: Dispatch vlserver probes in priority order 2024-01-01 16:37:27 +00:00
vl_probe.c afs: Keep a record of the current fileserver endpoint state 2024-01-01 16:37:27 +00:00
vl_rotate.c afs: Add some more info to /proc/net/afs/servers 2024-01-01 16:36:58 +00:00
vlclient.c afs: Don't leave DONTUSE/NEWREPSITE servers out of server list 2024-01-01 16:37:27 +00:00
volume.c afs: Increase buffer size in afs_update_volume_status() 2024-02-20 09:51:21 +01:00
write.c vfs-6.8.netfs 2024-01-19 09:10:23 -08:00
xattr.c afs: Add __counted_by for struct afs_acl and use struct_size() 2023-12-01 09:51:43 -08:00
xdr_fs.h
yfsclient.c afs: trace: Log afs_make_call(), including server address 2024-01-01 16:37:27 +00:00