summaryrefslogtreecommitdiffstats
path: root/fs/afs/server.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2018-10-20 00:57:58 +0100
committerDavid Howells <dhowells@redhat.com>2018-10-24 00:41:08 +0100
commit30062bd13e3659a309d249a06d5f4ebb4a5c5251 (patch)
tree151b4925fbf78d25f098fe54a1d2422a434ee780 /fs/afs/server.c
parentd4936803a92b7d088086b1d7b8ecb5739d52c03b (diff)
afs: Implement YFS support in the fs client
Implement support for talking to YFS-variant fileservers in the cache manager and the filesystem client. These implement upgraded services on the same port as their AFS services. YFS fileservers provide expanded capabilities over AFS. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/server.c')
-rw-r--r--fs/afs/server.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/afs/server.c b/fs/afs/server.c
index 1a087eb8f2d7..aa35cfae5440 100644
--- a/fs/afs/server.c
+++ b/fs/afs/server.c
@@ -13,6 +13,7 @@
#include <linux/slab.h>
#include "afs_fs.h"
#include "internal.h"
+#include "protocol_yfs.h"
static unsigned afs_server_gc_delay = 10; /* Server record timeout in seconds */
static unsigned afs_server_update_delay = 30; /* Time till VLDB recheck in secs */
@@ -513,6 +514,8 @@ void afs_purge_servers(struct afs_net *net)
*/
static bool afs_do_probe_fileserver(struct afs_fs_cursor *fc)
{
+ int i;
+
_enter("");
fc->ac.addr = NULL;
@@ -526,6 +529,11 @@ static bool afs_do_probe_fileserver(struct afs_fs_cursor *fc)
&fc->ac, fc->key);
switch (fc->ac.error) {
case 0:
+ if (test_bit(AFS_SERVER_FL_IS_YFS, &fc->cbi->server->flags)) {
+ for (i = 0; i < fc->ac.alist->nr_addrs; i++)
+ fc->ac.alist->addrs[i].srx_service =
+ YFS_FS_SERVICE;
+ }
afs_end_cursor(&fc->ac);
set_bit(AFS_SERVER_FL_PROBED, &fc->cbi->server->flags);
return true;