diff options
author | David Howells <dhowells@redhat.com> | 2020-08-20 16:13:05 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2020-08-20 18:21:28 +0100 |
commit | e4686c79b103c0a73b8ed41e5fd967da201b6fba (patch) | |
tree | d33ffa021696190c0a20c762ea065bc7dad72120 /fs/afs | |
parent | b95b30940ee46a4d892ca3de3ffb8249c4985b1f (diff) | |
download | linux-e4686c79b103c0a73b8ed41e5fd967da201b6fba.tar.gz linux-e4686c79b103c0a73b8ed41e5fd967da201b6fba.tar.bz2 linux-e4686c79b103c0a73b8ed41e5fd967da201b6fba.zip |
afs: Fix error handling in VL server rotation
The error handling in the VL server rotation in the case of there being no
contactable servers is not correct. In such a case, the records of all the
servers in the list are scanned and the errors and abort codes are mapped
and prioritised and one error is chosen. This is then forgotten and the
default error is used (EDESTADDRREQ).
Fix this by using the calculated error.
Also we need to note whether a server responded on one of its endpoints so
that we can priorise an error from an abort message over local and network
errors.
Fixes: 4584ae96ae30 ("afs: Fix missing net error handling")
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs')
-rw-r--r-- | fs/afs/vl_rotate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/afs/vl_rotate.c b/fs/afs/vl_rotate.c index ab2beb4ba20e..c0458c903b31 100644 --- a/fs/afs/vl_rotate.c +++ b/fs/afs/vl_rotate.c @@ -263,10 +263,14 @@ no_more_servers: for (i = 0; i < vc->server_list->nr_servers; i++) { struct afs_vlserver *s = vc->server_list->servers[i].server; + if (test_bit(AFS_VLSERVER_FL_RESPONDING, &s->flags)) + e.responded = true; afs_prioritise_error(&e, READ_ONCE(s->probe.error), s->probe.abort_code); } + error = e.error; + failed_set_error: vc->error = error; failed: |