]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6fa340552714f88341581750e16ed71b11efd484
tree3afe04fe4a054f74c7cfe1502cbfcee583b0d9ad
parent5779ff9f71214e2918217325212723e451a6390f
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: 14f0e51ae40f ("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