• David Howells's avatar
    afs: Fix missing net error handling · 4584ae96
    David Howells authored
    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: 0fafdc9f ("afs: Fix file locking")
    Fixes: 0338747d8454 ("afs: Probe multiple fileservers simultaneously")
    Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    4584ae96
vl_rotate.c 7.98 KB