summaryrefslogtreecommitdiff
path: root/fs/afs/server.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2020-05-02 13:39:57 +0100
committerDavid Howells <dhowells@redhat.com>2020-06-04 15:37:58 +0100
commitf3c130e6e6d15822e1553531f91ecc8f3375bac3 (patch)
tree01da08ef80e11a61a4b1fc67bbb1d2f0095fa4f5 /fs/afs/server.c
parentf11a016a852f32e9c991baf6a036390eac5b4266 (diff)
downloadlwn-f3c130e6e6d15822e1553531f91ecc8f3375bac3.tar.gz
lwn-f3c130e6e6d15822e1553531f91ecc8f3375bac3.zip
afs: Don't use probe running state to make decisions outside probe code
Don't use the running state for fileserver probes to make decisions about which server to use as the state is cleared at the start of a probe and also intermediate values might be misleading. Instead, add a separate 'latest known' rtt in the afs_server struct and a flag to indicate if the server is known to be responding and update these as and when we know what to change them to. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/server.c')
-rw-r--r--fs/afs/server.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/afs/server.c b/fs/afs/server.c
index 88593ffcb54e..039e3488511c 100644
--- a/fs/afs/server.c
+++ b/fs/afs/server.c
@@ -239,6 +239,7 @@ static struct afs_server *afs_alloc_server(struct afs_cell *cell,
INIT_LIST_HEAD(&server->probe_link);
spin_lock_init(&server->probe_lock);
server->cell = cell;
+ server->rtt = UINT_MAX;
afs_inc_servers_outstanding(net);
trace_afs_server(server, 1, 1, afs_server_trace_alloc);