浏览代码

afs: Fix server rotation's handling of fileserver probe failure

The server rotation algorithm just gives up if it fails to probe a
fileserver.  Fix this by rotating to the next fileserver instead.

Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation")
Signed-off-by: David Howells <dhowells@redhat.com>
David Howells 7 年之前
父节点
当前提交
ec5a3b4b50
共有 1 个文件被更改,包括 10 次插入2 次删除
  1. 10 2
      fs/afs/rotate.c

+ 10 - 2
fs/afs/rotate.c

@@ -369,8 +369,16 @@ use_server:
 	if (!test_bit(AFS_SERVER_FL_PROBED, &server->flags)) {
 	if (!test_bit(AFS_SERVER_FL_PROBED, &server->flags)) {
 		fc->ac.alist = afs_get_addrlist(alist);
 		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)
 	if (!fc->ac.alist)