.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. |
---|
3 | 4 | * Written by David Howells (dhowells@redhat.com) |
---|
.. | .. |
---|
42 | 43 | } |
---|
43 | 44 | |
---|
44 | 45 | #ifdef CONFIG_NFS_V4_1 |
---|
45 | | -/** |
---|
| 46 | +/* |
---|
46 | 47 | * Per auth flavor data server rpc clients |
---|
47 | 48 | */ |
---|
48 | 49 | struct nfs4_ds_server { |
---|
.. | .. |
---|
51 | 52 | }; |
---|
52 | 53 | |
---|
53 | 54 | /** |
---|
54 | | - * Common lookup case for DS I/O |
---|
| 55 | + * nfs4_find_ds_client - Common lookup case for DS I/O |
---|
| 56 | + * @ds_clp: pointer to the DS's nfs_client |
---|
| 57 | + * @flavor: rpc auth flavour to match |
---|
55 | 58 | */ |
---|
56 | 59 | static struct nfs4_ds_server * |
---|
57 | 60 | nfs4_find_ds_client(struct nfs_client *ds_clp, rpc_authflavor_t flavor) |
---|
.. | .. |
---|
118 | 121 | } |
---|
119 | 122 | |
---|
120 | 123 | /** |
---|
121 | | -* Find or create a DS rpc client with th MDS server rpc client auth flavor |
---|
122 | | -* in the nfs_client cl_ds_clients list. |
---|
123 | | -*/ |
---|
| 124 | + * nfs4_find_or_create_ds_client - Find or create a DS rpc client |
---|
| 125 | + * @ds_clp: pointer to the DS's nfs_client |
---|
| 126 | + * @inode: pointer to the inode |
---|
| 127 | + * |
---|
| 128 | + * Find or create a DS rpc client with th MDS server rpc client auth flavor |
---|
| 129 | + * in the nfs_client cl_ds_clients list. |
---|
| 130 | + */ |
---|
124 | 131 | struct rpc_clnt * |
---|
125 | 132 | nfs4_find_or_create_ds_client(struct nfs_client *ds_clp, struct inode *inode) |
---|
126 | 133 | { |
---|
.. | .. |
---|
145 | 152 | nfs4_shutdown_ds_clients(struct nfs_client *clp) |
---|
146 | 153 | { |
---|
147 | 154 | struct nfs4_ds_server *dss; |
---|
148 | | - LIST_HEAD(shutdown_list); |
---|
149 | 155 | |
---|
150 | 156 | while (!list_empty(&clp->cl_ds_clients)) { |
---|
151 | 157 | dss = list_entry(clp->cl_ds_clients.next, |
---|
.. | .. |
---|
324 | 330 | |
---|
325 | 331 | /** |
---|
326 | 332 | * nfs40_init_client - nfs_client initialization tasks for NFSv4.0 |
---|
327 | | - * @clp - nfs_client to initialize |
---|
| 333 | + * @clp: nfs_client to initialize |
---|
328 | 334 | * |
---|
329 | 335 | * Returns zero on success, or a negative errno if some error occurred. |
---|
330 | 336 | */ |
---|
.. | .. |
---|
340 | 346 | ret = nfs4_setup_slot_table(tbl, NFS4_MAX_SLOT_TABLE, |
---|
341 | 347 | "NFSv4.0 transport Slot table"); |
---|
342 | 348 | if (ret) { |
---|
| 349 | + nfs4_shutdown_slot_table(tbl); |
---|
343 | 350 | kfree(tbl); |
---|
344 | 351 | return ret; |
---|
345 | 352 | } |
---|
.. | .. |
---|
352 | 359 | |
---|
353 | 360 | /** |
---|
354 | 361 | * nfs41_init_client - nfs_client initialization tasks for NFSv4.1+ |
---|
355 | | - * @clp - nfs_client to initialize |
---|
| 362 | + * @clp: nfs_client to initialize |
---|
356 | 363 | * |
---|
357 | 364 | * Returns zero on success, or a negative errno if some error occurred. |
---|
358 | 365 | */ |
---|
.. | .. |
---|
400 | 407 | * nfs4_init_client - Initialise an NFS4 client record |
---|
401 | 408 | * |
---|
402 | 409 | * @clp: nfs_client to initialise |
---|
403 | | - * @timeparms: timeout parameters for underlying RPC transport |
---|
404 | | - * @ip_addr: callback IP address in presentation format |
---|
405 | | - * @authflavor: authentication flavor for underlying RPC transport |
---|
| 410 | + * @cl_init: pointer to nfs_client_initdata |
---|
406 | 411 | * |
---|
407 | 412 | * Returns pointer to an NFS client, or an ERR_PTR value. |
---|
408 | 413 | */ |
---|
.. | .. |
---|
546 | 551 | */ |
---|
547 | 552 | int nfs40_walk_client_list(struct nfs_client *new, |
---|
548 | 553 | struct nfs_client **result, |
---|
549 | | - struct rpc_cred *cred) |
---|
| 554 | + const struct cred *cred) |
---|
550 | 555 | { |
---|
551 | 556 | struct nfs_net *nn = net_generic(new->cl_net, nfs_net_id); |
---|
552 | 557 | struct nfs_client *pos, *prev = NULL; |
---|
.. | .. |
---|
626 | 631 | /* |
---|
627 | 632 | * Returns true if the server major ids match |
---|
628 | 633 | */ |
---|
629 | | -static bool |
---|
| 634 | +bool |
---|
630 | 635 | nfs4_check_serverowner_major_id(struct nfs41_server_owner *o1, |
---|
631 | 636 | struct nfs41_server_owner *o2) |
---|
632 | 637 | { |
---|
.. | .. |
---|
650 | 655 | |
---|
651 | 656 | /** |
---|
652 | 657 | * nfs4_detect_session_trunking - Checks for session trunking. |
---|
653 | | - * |
---|
654 | | - * Called after a successful EXCHANGE_ID on a multi-addr connection. |
---|
655 | | - * Upon success, add the transport. |
---|
656 | | - * |
---|
657 | 658 | * @clp: original mount nfs_client |
---|
658 | 659 | * @res: result structure from an exchange_id using the original mount |
---|
659 | 660 | * nfs_client with a new multi_addr transport |
---|
| 661 | + * @xprt: pointer to the transport to add. |
---|
| 662 | + * |
---|
| 663 | + * Called after a successful EXCHANGE_ID on a multi-addr connection. |
---|
| 664 | + * Upon success, add the transport. |
---|
660 | 665 | * |
---|
661 | 666 | * Returns zero on success, otherwise -EINVAL |
---|
662 | 667 | * |
---|
.. | .. |
---|
712 | 717 | */ |
---|
713 | 718 | int nfs41_walk_client_list(struct nfs_client *new, |
---|
714 | 719 | struct nfs_client **result, |
---|
715 | | - struct rpc_cred *cred) |
---|
| 720 | + const struct cred *cred) |
---|
716 | 721 | { |
---|
717 | 722 | struct nfs_net *nn = net_generic(new->cl_net, nfs_net_id); |
---|
718 | 723 | struct nfs_client *pos, *prev = NULL; |
---|
.. | .. |
---|
859 | 864 | const size_t addrlen, |
---|
860 | 865 | const char *ip_addr, |
---|
861 | 866 | int proto, const struct rpc_timeout *timeparms, |
---|
862 | | - u32 minorversion, struct net *net) |
---|
| 867 | + u32 minorversion, unsigned int nconnect, |
---|
| 868 | + struct net *net) |
---|
863 | 869 | { |
---|
864 | 870 | struct nfs_client_initdata cl_init = { |
---|
865 | 871 | .hostname = hostname, |
---|
.. | .. |
---|
871 | 877 | .minorversion = minorversion, |
---|
872 | 878 | .net = net, |
---|
873 | 879 | .timeparms = timeparms, |
---|
| 880 | + .cred = server->cred, |
---|
874 | 881 | }; |
---|
875 | 882 | struct nfs_client *clp; |
---|
876 | 883 | |
---|
| 884 | + if (minorversion == 0) |
---|
| 885 | + __set_bit(NFS_CS_REUSEPORT, &cl_init.init_flags); |
---|
| 886 | + if (proto == XPRT_TRANSPORT_TCP) |
---|
| 887 | + cl_init.nconnect = nconnect; |
---|
| 888 | + |
---|
877 | 889 | if (server->flags & NFS_MOUNT_NORESVPORT) |
---|
878 | | - set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags); |
---|
| 890 | + __set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags); |
---|
879 | 891 | if (server->options & NFS_OPTION_MIGRATION) |
---|
880 | | - set_bit(NFS_CS_MIGRATION, &cl_init.init_flags); |
---|
| 892 | + __set_bit(NFS_CS_MIGRATION, &cl_init.init_flags); |
---|
881 | 893 | if (test_bit(NFS_MIG_TSM_POSSIBLE, &server->mig_status)) |
---|
882 | | - set_bit(NFS_CS_TSM_POSSIBLE, &cl_init.init_flags); |
---|
| 894 | + __set_bit(NFS_CS_TSM_POSSIBLE, &cl_init.init_flags); |
---|
883 | 895 | server->port = rpc_get_port(addr); |
---|
884 | 896 | |
---|
885 | 897 | /* Allocate or find a client reference we can use */ |
---|
.. | .. |
---|
932 | 944 | .minorversion = minor_version, |
---|
933 | 945 | .net = mds_clp->cl_net, |
---|
934 | 946 | .timeparms = &ds_timeout, |
---|
| 947 | + .cred = mds_srv->cred, |
---|
935 | 948 | }; |
---|
936 | 949 | char buf[INET6_ADDRSTRLEN + 1]; |
---|
937 | 950 | |
---|
938 | 951 | if (rpc_ntop(ds_addr, buf, sizeof(buf)) <= 0) |
---|
939 | 952 | return ERR_PTR(-EINVAL); |
---|
940 | 953 | cl_init.hostname = buf; |
---|
| 954 | + |
---|
| 955 | + if (mds_clp->cl_nconnect > 1 && ds_proto == XPRT_TRANSPORT_TCP) |
---|
| 956 | + cl_init.nconnect = mds_clp->cl_nconnect; |
---|
941 | 957 | |
---|
942 | 958 | if (mds_srv->flags & NFS_MOUNT_NORESVPORT) |
---|
943 | 959 | __set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags); |
---|
.. | .. |
---|
979 | 995 | #endif /* CONFIG_NFS_V4_1 */ |
---|
980 | 996 | } |
---|
981 | 997 | |
---|
| 998 | +/* |
---|
| 999 | + * Limit xattr sizes using the channel attributes. |
---|
| 1000 | + */ |
---|
| 1001 | +static void nfs4_session_limit_xasize(struct nfs_server *server) |
---|
| 1002 | +{ |
---|
| 1003 | +#ifdef CONFIG_NFS_V4_2 |
---|
| 1004 | + struct nfs4_session *sess; |
---|
| 1005 | + u32 server_gxa_sz; |
---|
| 1006 | + u32 server_sxa_sz; |
---|
| 1007 | + u32 server_lxa_sz; |
---|
| 1008 | + |
---|
| 1009 | + if (!nfs4_has_session(server->nfs_client)) |
---|
| 1010 | + return; |
---|
| 1011 | + |
---|
| 1012 | + sess = server->nfs_client->cl_session; |
---|
| 1013 | + |
---|
| 1014 | + server_gxa_sz = sess->fc_attrs.max_resp_sz - nfs42_maxgetxattr_overhead; |
---|
| 1015 | + server_sxa_sz = sess->fc_attrs.max_rqst_sz - nfs42_maxsetxattr_overhead; |
---|
| 1016 | + server_lxa_sz = sess->fc_attrs.max_resp_sz - |
---|
| 1017 | + nfs42_maxlistxattrs_overhead; |
---|
| 1018 | + |
---|
| 1019 | + if (server->gxasize > server_gxa_sz) |
---|
| 1020 | + server->gxasize = server_gxa_sz; |
---|
| 1021 | + if (server->sxasize > server_sxa_sz) |
---|
| 1022 | + server->sxasize = server_sxa_sz; |
---|
| 1023 | + if (server->lxasize > server_lxa_sz) |
---|
| 1024 | + server->lxasize = server_lxa_sz; |
---|
| 1025 | +#endif |
---|
| 1026 | +} |
---|
| 1027 | + |
---|
982 | 1028 | static int nfs4_server_common_setup(struct nfs_server *server, |
---|
983 | 1029 | struct nfs_fh *mntfh, bool auth_probe) |
---|
984 | 1030 | { |
---|
.. | .. |
---|
1002 | 1048 | server->caps |= server->nfs_client->cl_mvops->init_caps; |
---|
1003 | 1049 | if (server->flags & NFS_MOUNT_NORDIRPLUS) |
---|
1004 | 1050 | server->caps &= ~NFS_CAP_READDIRPLUS; |
---|
| 1051 | + if (server->nfs_client->cl_proto == XPRT_TRANSPORT_RDMA) |
---|
| 1052 | + server->caps &= ~NFS_CAP_READ_PLUS; |
---|
1005 | 1053 | /* |
---|
1006 | 1054 | * Don't use NFS uid/gid mapping if we're using AUTH_SYS or lower |
---|
1007 | 1055 | * authentication. |
---|
.. | .. |
---|
1026 | 1074 | goto out; |
---|
1027 | 1075 | |
---|
1028 | 1076 | nfs4_session_limit_rwsize(server); |
---|
| 1077 | + nfs4_session_limit_xasize(server); |
---|
1029 | 1078 | |
---|
1030 | 1079 | if (server->namelen == 0 || server->namelen > NFS4_MAXNAMLEN) |
---|
1031 | 1080 | server->namelen = NFS4_MAXNAMLEN; |
---|
.. | .. |
---|
1041 | 1090 | /* |
---|
1042 | 1091 | * Create a version 4 volume record |
---|
1043 | 1092 | */ |
---|
1044 | | -static int nfs4_init_server(struct nfs_server *server, |
---|
1045 | | - struct nfs_parsed_mount_data *data) |
---|
| 1093 | +static int nfs4_init_server(struct nfs_server *server, struct fs_context *fc) |
---|
1046 | 1094 | { |
---|
| 1095 | + struct nfs_fs_context *ctx = nfs_fc2context(fc); |
---|
1047 | 1096 | struct rpc_timeout timeparms; |
---|
1048 | 1097 | int error; |
---|
1049 | 1098 | |
---|
1050 | | - nfs_init_timeout_values(&timeparms, data->nfs_server.protocol, |
---|
1051 | | - data->timeo, data->retrans); |
---|
| 1099 | + nfs_init_timeout_values(&timeparms, ctx->nfs_server.protocol, |
---|
| 1100 | + ctx->timeo, ctx->retrans); |
---|
1052 | 1101 | |
---|
1053 | 1102 | /* Initialise the client representation from the mount data */ |
---|
1054 | | - server->flags = data->flags; |
---|
1055 | | - server->options = data->options; |
---|
1056 | | - server->auth_info = data->auth_info; |
---|
| 1103 | + server->flags = ctx->flags; |
---|
| 1104 | + server->options = ctx->options; |
---|
| 1105 | + server->auth_info = ctx->auth_info; |
---|
1057 | 1106 | |
---|
1058 | 1107 | /* Use the first specified auth flavor. If this flavor isn't |
---|
1059 | 1108 | * allowed by the server, use the SECINFO path to try the |
---|
1060 | 1109 | * other specified flavors */ |
---|
1061 | | - if (data->auth_info.flavor_len >= 1) |
---|
1062 | | - data->selected_flavor = data->auth_info.flavors[0]; |
---|
| 1110 | + if (ctx->auth_info.flavor_len >= 1) |
---|
| 1111 | + ctx->selected_flavor = ctx->auth_info.flavors[0]; |
---|
1063 | 1112 | else |
---|
1064 | | - data->selected_flavor = RPC_AUTH_UNIX; |
---|
| 1113 | + ctx->selected_flavor = RPC_AUTH_UNIX; |
---|
1065 | 1114 | |
---|
1066 | 1115 | /* Get a client record */ |
---|
1067 | 1116 | error = nfs4_set_client(server, |
---|
1068 | | - data->nfs_server.hostname, |
---|
1069 | | - (const struct sockaddr *)&data->nfs_server.address, |
---|
1070 | | - data->nfs_server.addrlen, |
---|
1071 | | - data->client_address, |
---|
1072 | | - data->nfs_server.protocol, |
---|
1073 | | - &timeparms, |
---|
1074 | | - data->minorversion, |
---|
1075 | | - data->net); |
---|
| 1117 | + ctx->nfs_server.hostname, |
---|
| 1118 | + &ctx->nfs_server.address, |
---|
| 1119 | + ctx->nfs_server.addrlen, |
---|
| 1120 | + ctx->client_address, |
---|
| 1121 | + ctx->nfs_server.protocol, |
---|
| 1122 | + &timeparms, |
---|
| 1123 | + ctx->minorversion, |
---|
| 1124 | + ctx->nfs_server.nconnect, |
---|
| 1125 | + fc->net_ns); |
---|
1076 | 1126 | if (error < 0) |
---|
1077 | 1127 | return error; |
---|
1078 | 1128 | |
---|
1079 | | - if (data->rsize) |
---|
1080 | | - server->rsize = nfs_block_size(data->rsize, NULL); |
---|
1081 | | - if (data->wsize) |
---|
1082 | | - server->wsize = nfs_block_size(data->wsize, NULL); |
---|
| 1129 | + if (ctx->rsize) |
---|
| 1130 | + server->rsize = nfs_block_size(ctx->rsize, NULL); |
---|
| 1131 | + if (ctx->wsize) |
---|
| 1132 | + server->wsize = nfs_block_size(ctx->wsize, NULL); |
---|
1083 | 1133 | |
---|
1084 | | - server->acregmin = data->acregmin * HZ; |
---|
1085 | | - server->acregmax = data->acregmax * HZ; |
---|
1086 | | - server->acdirmin = data->acdirmin * HZ; |
---|
1087 | | - server->acdirmax = data->acdirmax * HZ; |
---|
1088 | | - server->port = data->nfs_server.port; |
---|
| 1134 | + server->acregmin = ctx->acregmin * HZ; |
---|
| 1135 | + server->acregmax = ctx->acregmax * HZ; |
---|
| 1136 | + server->acdirmin = ctx->acdirmin * HZ; |
---|
| 1137 | + server->acdirmax = ctx->acdirmax * HZ; |
---|
| 1138 | + server->port = ctx->nfs_server.port; |
---|
1089 | 1139 | |
---|
1090 | 1140 | return nfs_init_server_rpcclient(server, &timeparms, |
---|
1091 | | - data->selected_flavor); |
---|
| 1141 | + ctx->selected_flavor); |
---|
1092 | 1142 | } |
---|
1093 | 1143 | |
---|
1094 | 1144 | /* |
---|
1095 | 1145 | * Create a version 4 volume record |
---|
1096 | 1146 | * - keyed on server and FSID |
---|
1097 | 1147 | */ |
---|
1098 | | -/*struct nfs_server *nfs4_create_server(const struct nfs_parsed_mount_data *data, |
---|
1099 | | - struct nfs_fh *mntfh)*/ |
---|
1100 | | -struct nfs_server *nfs4_create_server(struct nfs_mount_info *mount_info, |
---|
1101 | | - struct nfs_subversion *nfs_mod) |
---|
| 1148 | +struct nfs_server *nfs4_create_server(struct fs_context *fc) |
---|
1102 | 1149 | { |
---|
| 1150 | + struct nfs_fs_context *ctx = nfs_fc2context(fc); |
---|
1103 | 1151 | struct nfs_server *server; |
---|
1104 | 1152 | bool auth_probe; |
---|
1105 | 1153 | int error; |
---|
.. | .. |
---|
1108 | 1156 | if (!server) |
---|
1109 | 1157 | return ERR_PTR(-ENOMEM); |
---|
1110 | 1158 | |
---|
1111 | | - auth_probe = mount_info->parsed->auth_info.flavor_len < 1; |
---|
| 1159 | + server->cred = get_cred(current_cred()); |
---|
| 1160 | + |
---|
| 1161 | + auth_probe = ctx->auth_info.flavor_len < 1; |
---|
1112 | 1162 | |
---|
1113 | 1163 | /* set up the general RPC client */ |
---|
1114 | | - error = nfs4_init_server(server, mount_info->parsed); |
---|
| 1164 | + error = nfs4_init_server(server, fc); |
---|
1115 | 1165 | if (error < 0) |
---|
1116 | 1166 | goto error; |
---|
1117 | 1167 | |
---|
1118 | | - error = nfs4_server_common_setup(server, mount_info->mntfh, auth_probe); |
---|
| 1168 | + error = nfs4_server_common_setup(server, ctx->mntfh, auth_probe); |
---|
1119 | 1169 | if (error < 0) |
---|
1120 | 1170 | goto error; |
---|
1121 | 1171 | |
---|
.. | .. |
---|
1129 | 1179 | /* |
---|
1130 | 1180 | * Create an NFS4 referral server record |
---|
1131 | 1181 | */ |
---|
1132 | | -struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data, |
---|
1133 | | - struct nfs_fh *mntfh) |
---|
| 1182 | +struct nfs_server *nfs4_create_referral_server(struct fs_context *fc) |
---|
1134 | 1183 | { |
---|
| 1184 | + struct nfs_fs_context *ctx = nfs_fc2context(fc); |
---|
1135 | 1185 | struct nfs_client *parent_client; |
---|
1136 | 1186 | struct nfs_server *server, *parent_server; |
---|
1137 | 1187 | bool auth_probe; |
---|
.. | .. |
---|
1141 | 1191 | if (!server) |
---|
1142 | 1192 | return ERR_PTR(-ENOMEM); |
---|
1143 | 1193 | |
---|
1144 | | - parent_server = NFS_SB(data->sb); |
---|
| 1194 | + parent_server = NFS_SB(ctx->clone_data.sb); |
---|
1145 | 1195 | parent_client = parent_server->nfs_client; |
---|
| 1196 | + |
---|
| 1197 | + server->cred = get_cred(parent_server->cred); |
---|
1146 | 1198 | |
---|
1147 | 1199 | /* Initialise the client representation from the parent server */ |
---|
1148 | 1200 | nfs_server_copy_userdata(server, parent_server); |
---|
1149 | 1201 | |
---|
1150 | 1202 | /* Get a client representation */ |
---|
1151 | 1203 | #if IS_ENABLED(CONFIG_SUNRPC_XPRT_RDMA) |
---|
1152 | | - rpc_set_port(data->addr, NFS_RDMA_PORT); |
---|
1153 | | - error = nfs4_set_client(server, data->hostname, |
---|
1154 | | - data->addr, |
---|
1155 | | - data->addrlen, |
---|
| 1204 | + rpc_set_port(&ctx->nfs_server.address, NFS_RDMA_PORT); |
---|
| 1205 | + error = nfs4_set_client(server, |
---|
| 1206 | + ctx->nfs_server.hostname, |
---|
| 1207 | + &ctx->nfs_server.address, |
---|
| 1208 | + ctx->nfs_server.addrlen, |
---|
1156 | 1209 | parent_client->cl_ipaddr, |
---|
1157 | 1210 | XPRT_TRANSPORT_RDMA, |
---|
1158 | 1211 | parent_server->client->cl_timeout, |
---|
1159 | 1212 | parent_client->cl_mvops->minor_version, |
---|
| 1213 | + parent_client->cl_nconnect, |
---|
1160 | 1214 | parent_client->cl_net); |
---|
1161 | 1215 | if (!error) |
---|
1162 | 1216 | goto init_server; |
---|
1163 | 1217 | #endif /* IS_ENABLED(CONFIG_SUNRPC_XPRT_RDMA) */ |
---|
1164 | 1218 | |
---|
1165 | | - rpc_set_port(data->addr, NFS_PORT); |
---|
1166 | | - error = nfs4_set_client(server, data->hostname, |
---|
1167 | | - data->addr, |
---|
1168 | | - data->addrlen, |
---|
| 1219 | + rpc_set_port(&ctx->nfs_server.address, NFS_PORT); |
---|
| 1220 | + error = nfs4_set_client(server, |
---|
| 1221 | + ctx->nfs_server.hostname, |
---|
| 1222 | + &ctx->nfs_server.address, |
---|
| 1223 | + ctx->nfs_server.addrlen, |
---|
1169 | 1224 | parent_client->cl_ipaddr, |
---|
1170 | 1225 | XPRT_TRANSPORT_TCP, |
---|
1171 | 1226 | parent_server->client->cl_timeout, |
---|
1172 | 1227 | parent_client->cl_mvops->minor_version, |
---|
| 1228 | + parent_client->cl_nconnect, |
---|
1173 | 1229 | parent_client->cl_net); |
---|
1174 | 1230 | if (error < 0) |
---|
1175 | 1231 | goto error; |
---|
.. | .. |
---|
1177 | 1233 | #if IS_ENABLED(CONFIG_SUNRPC_XPRT_RDMA) |
---|
1178 | 1234 | init_server: |
---|
1179 | 1235 | #endif |
---|
1180 | | - error = nfs_init_server_rpcclient(server, parent_server->client->cl_timeout, data->authflavor); |
---|
| 1236 | + error = nfs_init_server_rpcclient(server, parent_server->client->cl_timeout, |
---|
| 1237 | + ctx->selected_flavor); |
---|
1181 | 1238 | if (error < 0) |
---|
1182 | 1239 | goto error; |
---|
1183 | 1240 | |
---|
1184 | 1241 | auth_probe = parent_server->auth_info.flavor_len < 1; |
---|
1185 | 1242 | |
---|
1186 | | - error = nfs4_server_common_setup(server, mntfh, auth_probe); |
---|
| 1243 | + error = nfs4_server_common_setup(server, ctx->mntfh, auth_probe); |
---|
1187 | 1244 | if (error < 0) |
---|
1188 | 1245 | goto error; |
---|
1189 | 1246 | |
---|
.. | .. |
---|
1265 | 1322 | set_bit(NFS_MIG_TSM_POSSIBLE, &server->mig_status); |
---|
1266 | 1323 | error = nfs4_set_client(server, hostname, sap, salen, buf, |
---|
1267 | 1324 | clp->cl_proto, clnt->cl_timeout, |
---|
1268 | | - clp->cl_minorversion, net); |
---|
| 1325 | + clp->cl_minorversion, |
---|
| 1326 | + clp->cl_nconnect, net); |
---|
1269 | 1327 | clear_bit(NFS_MIG_TSM_POSSIBLE, &server->mig_status); |
---|
1270 | 1328 | if (error != 0) { |
---|
1271 | 1329 | nfs_server_insert_lists(server); |
---|