Skip to content

Commit e4686c7

Browse files
committed
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: 4584ae9 ("afs: Fix missing net error handling") Signed-off-by: David Howells <dhowells@redhat.com>
1 parent b95b309 commit e4686c7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎fs/afs/vl_rotate.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,14 @@ bool afs_select_vlserver(struct afs_vl_cursor *vc)
263263
for (i = 0; i < vc->server_list->nr_servers; i++) {
264264
struct afs_vlserver *s = vc->server_list->servers[i].server;
265265

266+
if (test_bit(AFS_VLSERVER_FL_RESPONDING, &s->flags))
267+
e.responded = true;
266268
afs_prioritise_error(&e, READ_ONCE(s->probe.error),
267269
s->probe.abort_code);
268270
}
269271

272+
error = e.error;
273+
270274
failed_set_error:
271275
vc->error = error;
272276
failed:

0 commit comments

Comments
 (0)