Commit 3d9fa911 authored by David Howells's avatar David Howells

afs: Fix VNOVOL handling in address rotation

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: d2ddc776 ("afs: Overhaul volume and server record caching and fileserver rotation")
Reported-by: default avatarMarc Dionne <marc.dionne@auristor.com>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent 684b0f68
...@@ -179,7 +179,7 @@ bool afs_select_fileserver(struct afs_fs_cursor *fc) ...@@ -179,7 +179,7 @@ bool afs_select_fileserver(struct afs_fs_cursor *fc)
*/ */
if (fc->flags & AFS_FS_CURSOR_VNOVOL) { if (fc->flags & AFS_FS_CURSOR_VNOVOL) {
fc->ac.error = -EREMOTEIO; fc->ac.error = -EREMOTEIO;
goto failed; goto next_server;
} }
write_lock(&vnode->volume->servers_lock); write_lock(&vnode->volume->servers_lock);
...@@ -201,7 +201,7 @@ bool afs_select_fileserver(struct afs_fs_cursor *fc) ...@@ -201,7 +201,7 @@ bool afs_select_fileserver(struct afs_fs_cursor *fc)
*/ */
if (vnode->volume->servers == fc->server_list) { if (vnode->volume->servers == fc->server_list) {
fc->ac.error = -EREMOTEIO; fc->ac.error = -EREMOTEIO;
goto failed; goto next_server;
} }
/* Try again */ /* Try again */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment