afs: Don't leave DONTUSE/NEWREPSITE servers out of server list
authorDavid Howells <dhowells@redhat.com>
Tue, 14 Nov 2023 11:17:24 +0000 (11:17 +0000)
committerDavid Howells <dhowells@redhat.com>
Mon, 1 Jan 2024 16:37:27 +0000 (16:37 +0000)
commitd3acd81ef916537f4f7321f3d7861f1950d5c304
treec69c7061b4c9666aa019cb326cc4bb4a80c20360
parentdd94888938f8fefc6ee29ef57560c1e87cc3e05e
afs: Don't leave DONTUSE/NEWREPSITE servers out of server list

Don't leave servers that are marked VLSF_DONTUSE or VLSF_NEWREPSITE out of
the server list for a volume; rather, mark DONTUSE ones excluded and mark
either NEWREPSITE excluded if the number of updated servers is <50% of the
usable servers or mark !NEWREPSITE excluded otherwise.

Mark the server list as a whole with a 3-state flag to indicate whether we
think the RW volume is being replicated to the RO volume, and, if so,
whether we should switch to using updated replication sites
(VLSF_NEWREPSITE) or stick with the old for now.

This processing is pushed up from the VLDB RPC reply parser to the code
that generates the server list from that information.

Doing this allows the old list to be kept with just the exclusion flags
replaced and to keep the server records pinned and maintained.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
fs/afs/internal.h
fs/afs/rotate.c
fs/afs/server_list.c
fs/afs/vlclient.c