diff options
author | David Howells <dhowells@redhat.com> | 2020-05-02 15:39:57 +0300 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2020-06-04 17:37:58 +0300 |
commit | f3c130e6e6d15822e1553531f91ecc8f3375bac3 (patch) | |
tree | 01da08ef80e11a61a4b1fc67bbb1d2f0095fa4f5 /fs/afs/rotate.c | |
parent | f11a016a852f32e9c991baf6a036390eac5b4266 (diff) | |
download | linux-f3c130e6e6d15822e1553531f91ecc8f3375bac3.tar.xz |
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/rotate.c')
-rw-r--r-- | fs/afs/rotate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/afs/rotate.c b/fs/afs/rotate.c index 8d5473cd8ea4..14863678ae9e 100644 --- a/fs/afs/rotate.c +++ b/fs/afs/rotate.c @@ -341,7 +341,8 @@ pick_server: for (i = 0; i < op->server_list->nr_servers; i++) { struct afs_server *s = op->server_list->servers[i].server; - if (!test_bit(i, &op->untried) || !s->probe.responded) + if (!test_bit(i, &op->untried) || + !test_bit(AFS_SERVER_FL_RESPONDING, &s->flags)) continue; if (s->probe.rtt < rtt) { op->index = i; |