OSDN Git Service

afs: Fix missing net error handling
authorDavid Howells <dhowells@redhat.com>
Tue, 13 Nov 2018 23:20:28 +0000 (23:20 +0000)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 30 Nov 2018 02:08:14 +0000 (21:08 -0500)
commit4584ae96ae307613625e80cb9c7d9a981bed47a7
tree3afe04fe4a054f74c7cfe1502cbfcee583b0d9ad
parentae3b7361dc0ee9a425bf7d77ce211f533500b39b
afs: Fix missing net error handling

kAFS can be given certain network errors (EADDRNOTAVAIL, EHOSTDOWN and
ERFKILL) that it doesn't handle in its server/address rotation algorithms.
They cause the probing and rotation to abort immediately rather than
rotating.

Fix this by:

 (1) Abstracting out the error prioritisation from the VL and FS rotation
     algorithms into a common function and expand usage into the server
     probing code.

     When multiple errors are available, this code selects the one we'd
     prefer to return.

 (2) Add handling for EADDRNOTAVAIL, EHOSTDOWN and ERFKILL.

Fixes: 0fafdc9f888b ("afs: Fix file locking")
Fixes: 0338747d8454 ("afs: Probe multiple fileservers simultaneously")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/afs/fs_probe.c
fs/afs/internal.h
fs/afs/misc.c
fs/afs/rotate.c
fs/afs/vl_probe.c
fs/afs/vl_rotate.c