Skip to content

Commit

Permalink
afs: Fix VNOVOL handling in address rotation
Browse files Browse the repository at this point in the history
If a volume location record lists multiple file servers for a volume, then
it's possible that due to a misconfiguration or a changing configuration
that one of the file servers doesn't know about it yet and will abort
VNOVOL.  Currently, the rotation algorithm will stop with EREMOTEIO.

Fix this by moving on to try the next server if VNOVOL is returned.  Once
all the servers have been tried and the record rechecked, the algorithm
will stop with EREMOTEIO or ENOMEDIUM.

Fixes: d2ddc77 ("afs: Overhaul volume and server record caching and fileserver rotation")
Reported-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
David Howells committed May 14, 2018
1 parent 684b0f6 commit 3d9fa91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/afs/rotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ bool afs_select_fileserver(struct afs_fs_cursor *fc)
*/
if (fc->flags & AFS_FS_CURSOR_VNOVOL) {
fc->ac.error = -EREMOTEIO;
goto failed;
goto next_server;
}

write_lock(&vnode->volume->servers_lock);
Expand All @@ -201,7 +201,7 @@ bool afs_select_fileserver(struct afs_fs_cursor *fc)
*/
if (vnode->volume->servers == fc->server_list) {
fc->ac.error = -EREMOTEIO;
goto failed;
goto next_server;
}

/* Try again */
Expand Down

0 comments on commit 3d9fa91

Please sign in to comment.