diff options
author | David Howells <dhowells@redhat.com> | 2017-11-02 15:27:50 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2017-11-13 15:38:18 +0000 |
commit | 8b2a464ced77fe35be72ab7d38152a9439daf8d3 (patch) | |
tree | ec478c8adebb6344513581b60935c0cf2b0ff937 /fs/afs/vlclient.c | |
parent | 989782dcdc91a5e6d5999c7a52a84a60a0811e56 (diff) | |
download | linux-next-8b2a464ced77fe35be72ab7d38152a9439daf8d3.tar.gz |
afs: Add an address list concept
Add an RCU replaceable address list structure to hold a list of server
addresses. The list also holds the
To this end:
(1) A cell's VL server address list can be loaded directly via insmod or
echo to /proc/fs/afs/cells or dynamically from a DNS query for AFSDB
or SRV records.
(2) Anyone wanting to use a cell's VL server address must wait until the
cell record comes online and has tried to obtain some addresses.
(3) An FS server's address list, for the moment, has a single entry that
is the key to the server list. This will change in the future when a
server is instead keyed on its UUID and the VL.GetAddrsU operation is
used.
(4) An 'address cursor' concept is introduced to handle iteration through
the address list. This is passed to the afs_make_call() as, in the
future, stuff (such as abort code) that doesn't outlast the call will
be returned in it.
In the future, we might want to annotate the list with information about
how each address fares. We might then want to propagate such annotations
over address list replacement.
Whilst we're at it, we allow IPv6 addresses to be specified in
colon-delimited lists by enclosing them in square brackets.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/vlclient.c')
-rw-r--r-- | fs/afs/vlclient.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/afs/vlclient.c b/fs/afs/vlclient.c index aa79fe3f168b..1d1e7df77dd5 100644 --- a/fs/afs/vlclient.c +++ b/fs/afs/vlclient.c @@ -114,7 +114,7 @@ static const struct afs_call_type afs_RXVLGetEntryById = { * dispatch a get volume entry by name operation */ int afs_vl_get_entry_by_name(struct afs_net *net, - struct sockaddr_rxrpc *addr, + struct afs_addr_cursor *ac, struct key *key, const char *volname, struct afs_cache_vlocation *entry, @@ -146,14 +146,14 @@ int afs_vl_get_entry_by_name(struct afs_net *net, memset((void *) bp + volnamesz, 0, padsz); /* initiate the call */ - return afs_make_call(addr, call, GFP_KERNEL, async); + return afs_make_call(ac, call, GFP_KERNEL, async); } /* * dispatch a get volume entry by ID operation */ int afs_vl_get_entry_by_id(struct afs_net *net, - struct sockaddr_rxrpc *addr, + struct afs_addr_cursor *ac, struct key *key, afs_volid_t volid, afs_voltype_t voltype, @@ -179,5 +179,5 @@ int afs_vl_get_entry_by_id(struct afs_net *net, *bp = htonl(voltype); /* initiate the call */ - return afs_make_call(addr, call, GFP_KERNEL, async); + return afs_make_call(ac, call, GFP_KERNEL, async); } |