Skip to content

Commit

Permalink
afs: Fix server rotation's handling of fileserver probe failure
Browse files Browse the repository at this point in the history
The server rotation algorithm just gives up if it fails to probe a
fileserver.  Fix this by rotating to the next fileserver instead.

Fixes: d2ddc77 ("afs: Overhaul volume and server record caching and fileserver rotation")
Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
David Howells committed May 14, 2018
1 parent d4a96be commit ec5a3b4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions fs/afs/rotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,16 @@ bool afs_select_fileserver(struct afs_fs_cursor *fc)
if (!test_bit(AFS_SERVER_FL_PROBED, &server->flags)) {
fc->ac.alist = afs_get_addrlist(alist);

if (!afs_probe_fileserver(fc))
goto failed;
if (!afs_probe_fileserver(fc)) {
switch (fc->ac.error) {
case -ENOMEM:
case -ERESTARTSYS:
case -EINTR:
goto failed;
default:
goto next_server;
}
}
}

if (!fc->ac.alist)
Expand Down

0 comments on commit ec5a3b4

Please sign in to comment.