David Howells | ec26815 | 2007-04-26 15:49:28 -0700 | [diff] [blame] | 1 | /* AFS Volume Location Service client |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * |
| 3 | * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved. |
| 4 | * Written by David Howells ([email protected]) |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * as published by the Free Software Foundation; either version |
| 9 | * 2 of the License, or (at your option) any later version. |
| 10 | */ |
| 11 | |
Tejun Heo | 5a0e3ad | 2010-03-24 17:04:11 +0900 | [diff] [blame] | 12 | #include <linux/gfp.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | #include <linux/init.h> |
| 14 | #include <linux/sched.h> |
David Howells | 4d9df98 | 2017-11-02 15:27:47 +0000 | [diff] [blame] | 15 | #include "afs_fs.h" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | #include "internal.h" |
| 17 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | /* |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 19 | * Deliver reply data to a VL.GetEntryByNameU call. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | */ |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 21 | static int afs_deliver_vl_get_entry_by_name_u(struct afs_call *call) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | { |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 23 | struct afs_uvldbentry__xdr *uvldb; |
| 24 | struct afs_vldb_entry *entry; |
| 25 | bool new_only = false; |
Marc Dionne | 1fba586 | 2018-05-16 11:04:23 -0300 | [diff] [blame] | 26 | u32 tmp, nr_servers, vlflags; |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 27 | int i, ret; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | |
David Howells | d001648 | 2016-08-30 20:42:14 +0100 | [diff] [blame] | 29 | _enter(""); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | |
David Howells | d001648 | 2016-08-30 20:42:14 +0100 | [diff] [blame] | 31 | ret = afs_transfer_reply(call); |
David Howells | 372ee16 | 2016-08-03 14:11:40 +0100 | [diff] [blame] | 32 | if (ret < 0) |
| 33 | return ret; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 35 | /* unmarshall the reply once we've received all of it */ |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 36 | uvldb = call->buffer; |
David Howells | 97e3043 | 2017-11-02 15:27:48 +0000 | [diff] [blame] | 37 | entry = call->reply[0]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | |
David Howells | 45df846 | 2018-02-06 14:12:32 +0000 | [diff] [blame] | 39 | nr_servers = ntohl(uvldb->nServers); |
| 40 | if (nr_servers > AFS_NMAXNSERVERS) |
| 41 | nr_servers = AFS_NMAXNSERVERS; |
| 42 | |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 43 | for (i = 0; i < ARRAY_SIZE(uvldb->name) - 1; i++) |
| 44 | entry->name[i] = (u8)ntohl(uvldb->name[i]); |
| 45 | entry->name[i] = 0; |
| 46 | entry->name_len = strlen(entry->name); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 48 | /* If there is a new replication site that we can use, ignore all the |
| 49 | * sites that aren't marked as new. |
| 50 | */ |
David Howells | 45df846 | 2018-02-06 14:12:32 +0000 | [diff] [blame] | 51 | for (i = 0; i < nr_servers; i++) { |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 52 | tmp = ntohl(uvldb->serverFlags[i]); |
| 53 | if (!(tmp & AFS_VLSF_DONTUSE) && |
| 54 | (tmp & AFS_VLSF_NEWREPSITE)) |
| 55 | new_only = true; |
David Howells | 4d9df98 | 2017-11-02 15:27:47 +0000 | [diff] [blame] | 56 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 | |
Marc Dionne | 1fba586 | 2018-05-16 11:04:23 -0300 | [diff] [blame] | 58 | vlflags = ntohl(uvldb->flags); |
David Howells | 45df846 | 2018-02-06 14:12:32 +0000 | [diff] [blame] | 59 | for (i = 0; i < nr_servers; i++) { |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 60 | struct afs_uuid__xdr *xdr; |
| 61 | struct afs_uuid *uuid; |
| 62 | int j; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 63 | |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 64 | tmp = ntohl(uvldb->serverFlags[i]); |
| 65 | if (tmp & AFS_VLSF_DONTUSE || |
| 66 | (new_only && !(tmp & AFS_VLSF_NEWREPSITE))) |
| 67 | continue; |
Marc Dionne | 1fba586 | 2018-05-16 11:04:23 -0300 | [diff] [blame] | 68 | if (tmp & AFS_VLSF_RWVOL) { |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 69 | entry->fs_mask[i] |= AFS_VOL_VTM_RW; |
Marc Dionne | 1fba586 | 2018-05-16 11:04:23 -0300 | [diff] [blame] | 70 | if (vlflags & AFS_VLF_BACKEXISTS) |
| 71 | entry->fs_mask[i] |= AFS_VOL_VTM_BAK; |
| 72 | } |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 73 | if (tmp & AFS_VLSF_ROVOL) |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 74 | entry->fs_mask[i] |= AFS_VOL_VTM_RO; |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 75 | if (!entry->fs_mask[i]) |
| 76 | continue; |
| 77 | |
| 78 | xdr = &uvldb->serverNumber[i]; |
| 79 | uuid = (struct afs_uuid *)&entry->fs_server[i]; |
| 80 | uuid->time_low = xdr->time_low; |
| 81 | uuid->time_mid = htons(ntohl(xdr->time_mid)); |
| 82 | uuid->time_hi_and_version = htons(ntohl(xdr->time_hi_and_version)); |
| 83 | uuid->clock_seq_hi_and_reserved = (u8)ntohl(xdr->clock_seq_hi_and_reserved); |
| 84 | uuid->clock_seq_low = (u8)ntohl(xdr->clock_seq_low); |
| 85 | for (j = 0; j < 6; j++) |
| 86 | uuid->node[j] = (u8)ntohl(xdr->node[j]); |
| 87 | |
| 88 | entry->nr_servers++; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 89 | } |
| 90 | |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 91 | for (i = 0; i < AFS_MAXTYPES; i++) |
| 92 | entry->vid[i] = ntohl(uvldb->volumeId[i]); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 93 | |
Marc Dionne | 1fba586 | 2018-05-16 11:04:23 -0300 | [diff] [blame] | 94 | if (vlflags & AFS_VLF_RWEXISTS) |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 95 | __set_bit(AFS_VLDB_HAS_RW, &entry->flags); |
Marc Dionne | 1fba586 | 2018-05-16 11:04:23 -0300 | [diff] [blame] | 96 | if (vlflags & AFS_VLF_ROEXISTS) |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 97 | __set_bit(AFS_VLDB_HAS_RO, &entry->flags); |
Marc Dionne | 1fba586 | 2018-05-16 11:04:23 -0300 | [diff] [blame] | 98 | if (vlflags & AFS_VLF_BACKEXISTS) |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 99 | __set_bit(AFS_VLDB_HAS_BAK, &entry->flags); |
| 100 | |
Marc Dionne | 1fba586 | 2018-05-16 11:04:23 -0300 | [diff] [blame] | 101 | if (!(vlflags & (AFS_VLF_RWEXISTS | AFS_VLF_ROEXISTS | AFS_VLF_BACKEXISTS))) { |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 102 | entry->error = -ENOMEDIUM; |
| 103 | __set_bit(AFS_VLDB_QUERY_ERROR, &entry->flags); |
| 104 | } |
| 105 | |
| 106 | __set_bit(AFS_VLDB_QUERY_VALID, &entry->flags); |
| 107 | _leave(" = 0 [done]"); |
| 108 | return 0; |
| 109 | } |
| 110 | |
| 111 | static void afs_destroy_vl_get_entry_by_name_u(struct afs_call *call) |
| 112 | { |
| 113 | kfree(call->reply[0]); |
| 114 | afs_flat_call_destructor(call); |
| 115 | } |
| 116 | |
| 117 | /* |
| 118 | * VL.GetEntryByNameU operation type. |
| 119 | */ |
| 120 | static const struct afs_call_type afs_RXVLGetEntryByNameU = { |
| 121 | .name = "VL.GetEntryByNameU", |
David Howells | 025db80 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 122 | .op = afs_VL_GetEntryByNameU, |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 123 | .deliver = afs_deliver_vl_get_entry_by_name_u, |
| 124 | .destructor = afs_destroy_vl_get_entry_by_name_u, |
| 125 | }; |
| 126 | |
| 127 | /* |
| 128 | * Dispatch a get volume entry by name or ID operation (uuid variant). If the |
| 129 | * volname is a decimal number then it's a volume ID not a volume name. |
| 130 | */ |
David Howells | 0a5143f | 2018-10-20 00:57:57 +0100 | [diff] [blame^] | 131 | struct afs_vldb_entry *afs_vl_get_entry_by_name_u(struct afs_vl_cursor *vc, |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 132 | const char *volname, |
| 133 | int volnamesz) |
| 134 | { |
| 135 | struct afs_vldb_entry *entry; |
| 136 | struct afs_call *call; |
David Howells | 0a5143f | 2018-10-20 00:57:57 +0100 | [diff] [blame^] | 137 | struct afs_net *net = vc->cell->net; |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 138 | size_t reqsz, padsz; |
| 139 | __be32 *bp; |
| 140 | |
| 141 | _enter(""); |
| 142 | |
| 143 | padsz = (4 - (volnamesz & 3)) & 3; |
| 144 | reqsz = 8 + volnamesz + padsz; |
| 145 | |
| 146 | entry = kzalloc(sizeof(struct afs_vldb_entry), GFP_KERNEL); |
| 147 | if (!entry) |
| 148 | return ERR_PTR(-ENOMEM); |
| 149 | |
| 150 | call = afs_alloc_flat_call(net, &afs_RXVLGetEntryByNameU, reqsz, |
| 151 | sizeof(struct afs_uvldbentry__xdr)); |
| 152 | if (!call) { |
| 153 | kfree(entry); |
| 154 | return ERR_PTR(-ENOMEM); |
| 155 | } |
| 156 | |
David Howells | 0a5143f | 2018-10-20 00:57:57 +0100 | [diff] [blame^] | 157 | call->key = vc->key; |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 158 | call->reply[0] = entry; |
| 159 | call->ret_reply0 = true; |
| 160 | |
| 161 | /* Marshall the parameters */ |
| 162 | bp = call->request; |
| 163 | *bp++ = htonl(VLGETENTRYBYNAMEU); |
| 164 | *bp++ = htonl(volnamesz); |
| 165 | memcpy(bp, volname, volnamesz); |
| 166 | if (padsz > 0) |
| 167 | memset((void *)bp + volnamesz, 0, padsz); |
| 168 | |
David Howells | 025db80 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 169 | trace_afs_make_vl_call(call); |
David Howells | 0a5143f | 2018-10-20 00:57:57 +0100 | [diff] [blame^] | 170 | return (struct afs_vldb_entry *)afs_make_call(&vc->ac, call, GFP_KERNEL, false); |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 171 | } |
| 172 | |
| 173 | /* |
| 174 | * Deliver reply data to a VL.GetAddrsU call. |
| 175 | * |
| 176 | * GetAddrsU(IN ListAddrByAttributes *inaddr, |
| 177 | * OUT afsUUID *uuidp1, |
| 178 | * OUT uint32_t *uniquifier, |
| 179 | * OUT uint32_t *nentries, |
| 180 | * OUT bulkaddrs *blkaddrs); |
| 181 | */ |
| 182 | static int afs_deliver_vl_get_addrs_u(struct afs_call *call) |
| 183 | { |
| 184 | struct afs_addr_list *alist; |
| 185 | __be32 *bp; |
| 186 | u32 uniquifier, nentries, count; |
| 187 | int i, ret; |
| 188 | |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 189 | _enter("{%u,%zu/%u}", |
| 190 | call->unmarshall, iov_iter_count(call->_iter), call->count); |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 191 | |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 192 | switch (call->unmarshall) { |
| 193 | case 0: |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 194 | afs_extract_to_buf(call, |
| 195 | sizeof(struct afs_uuid__xdr) + 3 * sizeof(__be32)); |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 196 | call->unmarshall++; |
| 197 | |
| 198 | /* Extract the returned uuid, uniquifier, nentries and blkaddrs size */ |
| 199 | case 1: |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 200 | ret = afs_extract_data(call, true); |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 201 | if (ret < 0) |
| 202 | return ret; |
| 203 | |
| 204 | bp = call->buffer + sizeof(struct afs_uuid__xdr); |
| 205 | uniquifier = ntohl(*bp++); |
| 206 | nentries = ntohl(*bp++); |
| 207 | count = ntohl(*bp); |
| 208 | |
| 209 | nentries = min(nentries, count); |
| 210 | alist = afs_alloc_addrlist(nentries, FS_SERVICE, AFS_FS_PORT); |
| 211 | if (!alist) |
| 212 | return -ENOMEM; |
| 213 | alist->version = uniquifier; |
| 214 | call->reply[0] = alist; |
| 215 | call->count = count; |
| 216 | call->count2 = nentries; |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 217 | call->unmarshall++; |
| 218 | |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 219 | more_entries: |
| 220 | count = min(call->count, 4U); |
| 221 | afs_extract_to_buf(call, count * sizeof(__be32)); |
| 222 | |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 223 | /* Extract entries */ |
| 224 | case 2: |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 225 | ret = afs_extract_data(call, call->count > 4); |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 226 | if (ret < 0) |
| 227 | return ret; |
| 228 | |
| 229 | alist = call->reply[0]; |
| 230 | bp = call->buffer; |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 231 | count = min(call->count, 4U); |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 232 | for (i = 0; i < count; i++) |
| 233 | if (alist->nr_addrs < call->count2) |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 234 | afs_merge_fs_addr4(alist, *bp++, AFS_FS_PORT); |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 235 | |
| 236 | call->count -= count; |
| 237 | if (call->count > 0) |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 238 | goto more_entries; |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 239 | call->unmarshall++; |
| 240 | break; |
| 241 | } |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 242 | |
| 243 | _leave(" = 0 [done]"); |
| 244 | return 0; |
David Howells | ec26815 | 2007-04-26 15:49:28 -0700 | [diff] [blame] | 245 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 246 | |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 247 | static void afs_vl_get_addrs_u_destructor(struct afs_call *call) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 248 | { |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 249 | afs_put_server(call->net, (struct afs_server *)call->reply[0]); |
| 250 | kfree(call->reply[1]); |
| 251 | return afs_flat_call_destructor(call); |
David Howells | ec26815 | 2007-04-26 15:49:28 -0700 | [diff] [blame] | 252 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 253 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 254 | /* |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 255 | * VL.GetAddrsU operation type. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 256 | */ |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 257 | static const struct afs_call_type afs_RXVLGetAddrsU = { |
| 258 | .name = "VL.GetAddrsU", |
David Howells | 025db80 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 259 | .op = afs_VL_GetAddrsU, |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 260 | .deliver = afs_deliver_vl_get_addrs_u, |
| 261 | .destructor = afs_vl_get_addrs_u_destructor, |
| 262 | }; |
| 263 | |
| 264 | /* |
| 265 | * Dispatch an operation to get the addresses for a server, where the server is |
| 266 | * nominated by UUID. |
| 267 | */ |
David Howells | 0a5143f | 2018-10-20 00:57:57 +0100 | [diff] [blame^] | 268 | struct afs_addr_list *afs_vl_get_addrs_u(struct afs_vl_cursor *vc, |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 269 | const uuid_t *uuid) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 270 | { |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 271 | struct afs_ListAddrByAttributes__xdr *r; |
| 272 | const struct afs_uuid *u = (const struct afs_uuid *)uuid; |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 273 | struct afs_call *call; |
David Howells | 0a5143f | 2018-10-20 00:57:57 +0100 | [diff] [blame^] | 274 | struct afs_net *net = vc->cell->net; |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 275 | __be32 *bp; |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 276 | int i; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 277 | |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 278 | _enter(""); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 279 | |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 280 | call = afs_alloc_flat_call(net, &afs_RXVLGetAddrsU, |
| 281 | sizeof(__be32) + sizeof(struct afs_ListAddrByAttributes__xdr), |
| 282 | sizeof(struct afs_uuid__xdr) + 3 * sizeof(__be32)); |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 283 | if (!call) |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 284 | return ERR_PTR(-ENOMEM); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 285 | |
David Howells | 0a5143f | 2018-10-20 00:57:57 +0100 | [diff] [blame^] | 286 | call->key = vc->key; |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 287 | call->reply[0] = NULL; |
| 288 | call->ret_reply0 = true; |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 289 | |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 290 | /* Marshall the parameters */ |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 291 | bp = call->request; |
David Howells | d2ddc77 | 2017-11-02 15:27:50 +0000 | [diff] [blame] | 292 | *bp++ = htonl(VLGETADDRSU); |
| 293 | r = (struct afs_ListAddrByAttributes__xdr *)bp; |
| 294 | r->Mask = htonl(AFS_VLADDR_UUID); |
| 295 | r->ipaddr = 0; |
| 296 | r->index = 0; |
| 297 | r->spare = 0; |
| 298 | r->uuid.time_low = u->time_low; |
| 299 | r->uuid.time_mid = htonl(ntohs(u->time_mid)); |
| 300 | r->uuid.time_hi_and_version = htonl(ntohs(u->time_hi_and_version)); |
| 301 | r->uuid.clock_seq_hi_and_reserved = htonl(u->clock_seq_hi_and_reserved); |
| 302 | r->uuid.clock_seq_low = htonl(u->clock_seq_low); |
| 303 | for (i = 0; i < 6; i++) |
David Howells | fe342cf7 | 2018-04-09 21:12:31 +0100 | [diff] [blame] | 304 | r->uuid.node[i] = htonl(u->node[i]); |
David Howells | 08e0e7c | 2007-04-26 15:55:03 -0700 | [diff] [blame] | 305 | |
David Howells | 025db80 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 306 | trace_afs_make_vl_call(call); |
David Howells | 0a5143f | 2018-10-20 00:57:57 +0100 | [diff] [blame^] | 307 | return (struct afs_addr_list *)afs_make_call(&vc->ac, call, GFP_KERNEL, false); |
David Howells | ec26815 | 2007-04-26 15:49:28 -0700 | [diff] [blame] | 308 | } |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 309 | |
| 310 | /* |
| 311 | * Deliver reply data to an VL.GetCapabilities operation. |
| 312 | */ |
| 313 | static int afs_deliver_vl_get_capabilities(struct afs_call *call) |
| 314 | { |
| 315 | u32 count; |
| 316 | int ret; |
| 317 | |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 318 | _enter("{%u,%zu/%u}", |
| 319 | call->unmarshall, iov_iter_count(call->_iter), call->count); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 320 | |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 321 | switch (call->unmarshall) { |
| 322 | case 0: |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 323 | afs_extract_to_tmp(call); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 324 | call->unmarshall++; |
| 325 | |
| 326 | /* Extract the capabilities word count */ |
| 327 | case 1: |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 328 | ret = afs_extract_data(call, true); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 329 | if (ret < 0) |
| 330 | return ret; |
| 331 | |
| 332 | count = ntohl(call->tmp); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 333 | call->count = count; |
| 334 | call->count2 = count; |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 335 | |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 336 | call->unmarshall++; |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 337 | afs_extract_discard(call, count * sizeof(__be32)); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 338 | |
| 339 | /* Extract capabilities words */ |
| 340 | case 2: |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 341 | ret = afs_extract_data(call, false); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 342 | if (ret < 0) |
| 343 | return ret; |
| 344 | |
| 345 | /* TODO: Examine capabilities */ |
| 346 | |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 347 | call->unmarshall++; |
| 348 | break; |
| 349 | } |
| 350 | |
| 351 | call->reply[0] = (void *)(unsigned long)call->service_id; |
| 352 | |
| 353 | _leave(" = 0 [done]"); |
| 354 | return 0; |
| 355 | } |
| 356 | |
| 357 | /* |
| 358 | * VL.GetCapabilities operation type |
| 359 | */ |
| 360 | static const struct afs_call_type afs_RXVLGetCapabilities = { |
| 361 | .name = "VL.GetCapabilities", |
David Howells | 025db80 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 362 | .op = afs_VL_GetCapabilities, |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 363 | .deliver = afs_deliver_vl_get_capabilities, |
| 364 | .destructor = afs_flat_call_destructor, |
| 365 | }; |
| 366 | |
| 367 | /* |
David Howells | 0a5143f | 2018-10-20 00:57:57 +0100 | [diff] [blame^] | 368 | * Probe a volume server for the capabilities that it supports. This can |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 369 | * return up to 196 words. |
| 370 | * |
| 371 | * We use this to probe for service upgrade to determine what the server at the |
| 372 | * other end supports. |
| 373 | */ |
David Howells | 0a5143f | 2018-10-20 00:57:57 +0100 | [diff] [blame^] | 374 | int afs_vl_get_capabilities(struct afs_net *net, struct afs_addr_cursor *ac, |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 375 | struct key *key) |
| 376 | { |
| 377 | struct afs_call *call; |
| 378 | __be32 *bp; |
| 379 | |
| 380 | _enter(""); |
| 381 | |
| 382 | call = afs_alloc_flat_call(net, &afs_RXVLGetCapabilities, 1 * 4, 16 * 4); |
| 383 | if (!call) |
| 384 | return -ENOMEM; |
| 385 | |
| 386 | call->key = key; |
| 387 | call->upgrade = true; /* Let's see if this is a YFS server */ |
| 388 | call->reply[0] = (void *)VLGETCAPABILITIES; |
| 389 | call->ret_reply0 = true; |
| 390 | |
| 391 | /* marshall the parameters */ |
| 392 | bp = call->request; |
| 393 | *bp++ = htonl(VLGETCAPABILITIES); |
| 394 | |
| 395 | /* Can't take a ref on server */ |
David Howells | 025db80 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 396 | trace_afs_make_vl_call(call); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 397 | return afs_make_call(ac, call, GFP_KERNEL, false); |
| 398 | } |
| 399 | |
| 400 | /* |
| 401 | * Deliver reply data to a YFSVL.GetEndpoints call. |
| 402 | * |
| 403 | * GetEndpoints(IN yfsServerAttributes *attr, |
| 404 | * OUT opr_uuid *uuid, |
| 405 | * OUT afs_int32 *uniquifier, |
| 406 | * OUT endpoints *fsEndpoints, |
| 407 | * OUT endpoints *volEndpoints) |
| 408 | */ |
| 409 | static int afs_deliver_yfsvl_get_endpoints(struct afs_call *call) |
| 410 | { |
| 411 | struct afs_addr_list *alist; |
| 412 | __be32 *bp; |
| 413 | u32 uniquifier, size; |
| 414 | int ret; |
| 415 | |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 416 | _enter("{%u,%zu,%u}", |
| 417 | call->unmarshall, iov_iter_count(call->_iter), call->count2); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 418 | |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 419 | switch (call->unmarshall) { |
| 420 | case 0: |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 421 | afs_extract_to_buf(call, sizeof(uuid_t) + 3 * sizeof(__be32)); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 422 | call->unmarshall = 1; |
| 423 | |
| 424 | /* Extract the returned uuid, uniquifier, fsEndpoints count and |
| 425 | * either the first fsEndpoint type or the volEndpoints |
| 426 | * count if there are no fsEndpoints. */ |
| 427 | case 1: |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 428 | ret = afs_extract_data(call, true); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 429 | if (ret < 0) |
| 430 | return ret; |
| 431 | |
| 432 | bp = call->buffer + sizeof(uuid_t); |
| 433 | uniquifier = ntohl(*bp++); |
| 434 | call->count = ntohl(*bp++); |
| 435 | call->count2 = ntohl(*bp); /* Type or next count */ |
| 436 | |
| 437 | if (call->count > YFS_MAXENDPOINTS) |
David Howells | 160cb95 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 438 | return afs_protocol_error(call, -EBADMSG, |
| 439 | afs_eproto_yvl_fsendpt_num); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 440 | |
| 441 | alist = afs_alloc_addrlist(call->count, FS_SERVICE, AFS_FS_PORT); |
| 442 | if (!alist) |
| 443 | return -ENOMEM; |
| 444 | alist->version = uniquifier; |
| 445 | call->reply[0] = alist; |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 446 | |
| 447 | if (call->count == 0) |
| 448 | goto extract_volendpoints; |
| 449 | |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 450 | next_fsendpoint: |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 451 | switch (call->count2) { |
| 452 | case YFS_ENDPOINT_IPV4: |
| 453 | size = sizeof(__be32) * (1 + 1 + 1); |
| 454 | break; |
| 455 | case YFS_ENDPOINT_IPV6: |
| 456 | size = sizeof(__be32) * (1 + 4 + 1); |
| 457 | break; |
| 458 | default: |
David Howells | 160cb95 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 459 | return afs_protocol_error(call, -EBADMSG, |
| 460 | afs_eproto_yvl_fsendpt_type); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 461 | } |
| 462 | |
| 463 | size += sizeof(__be32); |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 464 | afs_extract_to_buf(call, size); |
| 465 | call->unmarshall = 2; |
| 466 | |
| 467 | /* Extract fsEndpoints[] entries */ |
| 468 | case 2: |
| 469 | ret = afs_extract_data(call, true); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 470 | if (ret < 0) |
| 471 | return ret; |
| 472 | |
| 473 | alist = call->reply[0]; |
| 474 | bp = call->buffer; |
| 475 | switch (call->count2) { |
| 476 | case YFS_ENDPOINT_IPV4: |
| 477 | if (ntohl(bp[0]) != sizeof(__be32) * 2) |
David Howells | 160cb95 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 478 | return afs_protocol_error(call, -EBADMSG, |
| 479 | afs_eproto_yvl_fsendpt4_len); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 480 | afs_merge_fs_addr4(alist, bp[1], ntohl(bp[2])); |
| 481 | bp += 3; |
| 482 | break; |
| 483 | case YFS_ENDPOINT_IPV6: |
| 484 | if (ntohl(bp[0]) != sizeof(__be32) * 5) |
David Howells | 160cb95 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 485 | return afs_protocol_error(call, -EBADMSG, |
| 486 | afs_eproto_yvl_fsendpt6_len); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 487 | afs_merge_fs_addr6(alist, bp + 1, ntohl(bp[5])); |
| 488 | bp += 6; |
| 489 | break; |
| 490 | default: |
David Howells | 160cb95 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 491 | return afs_protocol_error(call, -EBADMSG, |
| 492 | afs_eproto_yvl_fsendpt_type); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 493 | } |
| 494 | |
| 495 | /* Got either the type of the next entry or the count of |
| 496 | * volEndpoints if no more fsEndpoints. |
| 497 | */ |
David Howells | fe342cf7 | 2018-04-09 21:12:31 +0100 | [diff] [blame] | 498 | call->count2 = ntohl(*bp++); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 499 | |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 500 | call->count--; |
| 501 | if (call->count > 0) |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 502 | goto next_fsendpoint; |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 503 | |
| 504 | extract_volendpoints: |
| 505 | /* Extract the list of volEndpoints. */ |
| 506 | call->count = call->count2; |
| 507 | if (!call->count) |
| 508 | goto end; |
| 509 | if (call->count > YFS_MAXENDPOINTS) |
David Howells | 160cb95 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 510 | return afs_protocol_error(call, -EBADMSG, |
| 511 | afs_eproto_yvl_vlendpt_type); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 512 | |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 513 | afs_extract_to_buf(call, 1 * sizeof(__be32)); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 514 | call->unmarshall = 3; |
| 515 | |
| 516 | /* Extract the type of volEndpoints[0]. Normally we would |
| 517 | * extract the type of the next endpoint when we extract the |
| 518 | * data of the current one, but this is the first... |
| 519 | */ |
| 520 | case 3: |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 521 | ret = afs_extract_data(call, true); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 522 | if (ret < 0) |
| 523 | return ret; |
| 524 | |
| 525 | bp = call->buffer; |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 526 | |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 527 | next_volendpoint: |
| 528 | call->count2 = ntohl(*bp++); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 529 | switch (call->count2) { |
| 530 | case YFS_ENDPOINT_IPV4: |
| 531 | size = sizeof(__be32) * (1 + 1 + 1); |
| 532 | break; |
| 533 | case YFS_ENDPOINT_IPV6: |
| 534 | size = sizeof(__be32) * (1 + 4 + 1); |
| 535 | break; |
| 536 | default: |
David Howells | 160cb95 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 537 | return afs_protocol_error(call, -EBADMSG, |
| 538 | afs_eproto_yvl_vlendpt_type); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 539 | } |
| 540 | |
| 541 | if (call->count > 1) |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 542 | size += sizeof(__be32); /* Get next type too */ |
| 543 | afs_extract_to_buf(call, size); |
| 544 | call->unmarshall = 4; |
| 545 | |
| 546 | /* Extract volEndpoints[] entries */ |
| 547 | case 4: |
| 548 | ret = afs_extract_data(call, true); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 549 | if (ret < 0) |
| 550 | return ret; |
| 551 | |
| 552 | bp = call->buffer; |
| 553 | switch (call->count2) { |
| 554 | case YFS_ENDPOINT_IPV4: |
| 555 | if (ntohl(bp[0]) != sizeof(__be32) * 2) |
David Howells | 160cb95 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 556 | return afs_protocol_error(call, -EBADMSG, |
| 557 | afs_eproto_yvl_vlendpt4_len); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 558 | bp += 3; |
| 559 | break; |
| 560 | case YFS_ENDPOINT_IPV6: |
| 561 | if (ntohl(bp[0]) != sizeof(__be32) * 5) |
David Howells | 160cb95 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 562 | return afs_protocol_error(call, -EBADMSG, |
| 563 | afs_eproto_yvl_vlendpt6_len); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 564 | bp += 6; |
| 565 | break; |
| 566 | default: |
David Howells | 160cb95 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 567 | return afs_protocol_error(call, -EBADMSG, |
| 568 | afs_eproto_yvl_vlendpt_type); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 569 | } |
| 570 | |
| 571 | /* Got either the type of the next entry or the count of |
| 572 | * volEndpoints if no more fsEndpoints. |
| 573 | */ |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 574 | call->count--; |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 575 | if (call->count > 0) |
| 576 | goto next_volendpoint; |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 577 | |
| 578 | end: |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 579 | afs_extract_discard(call, 0); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 580 | call->unmarshall = 5; |
| 581 | |
| 582 | /* Done */ |
| 583 | case 5: |
David Howells | 12bdcf333 | 2018-10-20 00:57:56 +0100 | [diff] [blame] | 584 | ret = afs_extract_data(call, false); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 585 | if (ret < 0) |
| 586 | return ret; |
| 587 | call->unmarshall = 6; |
| 588 | |
| 589 | case 6: |
| 590 | break; |
| 591 | } |
| 592 | |
| 593 | alist = call->reply[0]; |
| 594 | |
| 595 | /* Start with IPv6 if available. */ |
| 596 | if (alist->nr_ipv4 < alist->nr_addrs) |
| 597 | alist->index = alist->nr_ipv4; |
| 598 | |
| 599 | _leave(" = 0 [done]"); |
| 600 | return 0; |
| 601 | } |
| 602 | |
| 603 | /* |
| 604 | * YFSVL.GetEndpoints operation type. |
| 605 | */ |
| 606 | static const struct afs_call_type afs_YFSVLGetEndpoints = { |
David Howells | 025db80 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 607 | .name = "YFSVL.GetEndpoints", |
| 608 | .op = afs_YFSVL_GetEndpoints, |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 609 | .deliver = afs_deliver_yfsvl_get_endpoints, |
| 610 | .destructor = afs_vl_get_addrs_u_destructor, |
| 611 | }; |
| 612 | |
| 613 | /* |
| 614 | * Dispatch an operation to get the addresses for a server, where the server is |
| 615 | * nominated by UUID. |
| 616 | */ |
David Howells | 0a5143f | 2018-10-20 00:57:57 +0100 | [diff] [blame^] | 617 | struct afs_addr_list *afs_yfsvl_get_endpoints(struct afs_vl_cursor *vc, |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 618 | const uuid_t *uuid) |
| 619 | { |
| 620 | struct afs_call *call; |
David Howells | 0a5143f | 2018-10-20 00:57:57 +0100 | [diff] [blame^] | 621 | struct afs_net *net = vc->cell->net; |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 622 | __be32 *bp; |
| 623 | |
| 624 | _enter(""); |
| 625 | |
| 626 | call = afs_alloc_flat_call(net, &afs_YFSVLGetEndpoints, |
| 627 | sizeof(__be32) * 2 + sizeof(*uuid), |
| 628 | sizeof(struct in6_addr) + sizeof(__be32) * 3); |
| 629 | if (!call) |
| 630 | return ERR_PTR(-ENOMEM); |
| 631 | |
David Howells | 0a5143f | 2018-10-20 00:57:57 +0100 | [diff] [blame^] | 632 | call->key = vc->key; |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 633 | call->reply[0] = NULL; |
| 634 | call->ret_reply0 = true; |
| 635 | |
| 636 | /* Marshall the parameters */ |
| 637 | bp = call->request; |
| 638 | *bp++ = htonl(YVLGETENDPOINTS); |
| 639 | *bp++ = htonl(YFS_SERVER_UUID); |
| 640 | memcpy(bp, uuid, sizeof(*uuid)); /* Type opr_uuid */ |
| 641 | |
David Howells | 025db80 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 642 | trace_afs_make_vl_call(call); |
David Howells | 0a5143f | 2018-10-20 00:57:57 +0100 | [diff] [blame^] | 643 | return (struct afs_addr_list *)afs_make_call(&vc->ac, call, GFP_KERNEL, false); |
David Howells | bf99a53 | 2017-11-02 15:27:51 +0000 | [diff] [blame] | 644 | } |