summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2018-05-11 17:55:59 -0400
committerDavid Howells <dhowells@redhat.com>2018-05-14 10:15:18 -0400
commit3d9fa91161387ee629e7a07c47934d119910c8ae (patch)
tree96aa31448161a593509d6cc1fc429895525edf86 /fs
parent684b0f68cf1c1cf4a40834818653491c5cad4435 (diff)
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: d2ddc776a458 ("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>
Diffstat (limited to 'fs')
-rw-r--r--fs/afs/rotate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/afs/rotate.c b/fs/afs/rotate.c
index 84584dcced72..e065bc0768e6 100644
--- a/fs/afs/rotate.c
+++ b/fs/afs/rotate.c
@@ -179,7 +179,7 @@ bool afs_select_fileserver(struct afs_fs_cursor *fc)
179 */ 179 */
180 if (fc->flags & AFS_FS_CURSOR_VNOVOL) { 180 if (fc->flags & AFS_FS_CURSOR_VNOVOL) {
181 fc->ac.error = -EREMOTEIO; 181 fc->ac.error = -EREMOTEIO;
182 goto failed; 182 goto next_server;
183 } 183 }
184 184
185 write_lock(&vnode->volume->servers_lock); 185 write_lock(&vnode->volume->servers_lock);
@@ -201,7 +201,7 @@ bool afs_select_fileserver(struct afs_fs_cursor *fc)
201 */ 201 */
202 if (vnode->volume->servers == fc->server_list) { 202 if (vnode->volume->servers == fc->server_list) {
203 fc->ac.error = -EREMOTEIO; 203 fc->ac.error = -EREMOTEIO;
204 goto failed; 204 goto next_server;
205 } 205 }
206 206
207 /* Try again */ 207 /* Try again */