Lines Matching full:server
94 (tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION)) in smb3_encryption_required()
102 struct TCP_Server_Info *server) in smb2_hdr_assemble() argument
107 if (server) { in smb2_hdr_assemble()
108 spin_lock(&server->req_lock); in smb2_hdr_assemble()
110 if (server->credits >= server->max_credits) in smb2_hdr_assemble()
114 min_t(int, server->max_credits - in smb2_hdr_assemble()
115 server->credits, 10)); in smb2_hdr_assemble()
116 spin_unlock(&server->req_lock); in smb2_hdr_assemble()
127 if (server && (server->capabilities & SMB2_GLOBAL_CAP_LARGE_MTU)) in smb2_hdr_assemble()
138 * to pass the path on the Open SMB prefixed by \\server\share. in smb2_hdr_assemble()
141 * illegal to send an empty path name (without \\server\share prefix) in smb2_hdr_assemble()
149 if (server && server->sign && !smb3_encryption_required(tcon)) in smb2_hdr_assemble()
157 struct TCP_Server_Info *server) in smb2_reconnect() argument
190 (!tcon->ses->server) || !server) in smb2_reconnect()
194 retries = server->nr_targets; in smb2_reconnect()
201 while (server->tcpStatus == CifsNeedReconnect) { in smb2_reconnect()
217 rc = wait_event_interruptible_timeout(server->response_q, in smb2_reconnect()
218 (server->tcpStatus != CifsNeedReconnect), in smb2_reconnect()
227 if (server->tcpStatus != CifsNeedReconnect) in smb2_reconnect()
235 * retrying until process is killed or server comes in smb2_reconnect()
242 retries = server->nr_targets; in smb2_reconnect()
258 * and the server never sends an answer the socket will be closed in smb2_reconnect()
261 if (server->tcpStatus == CifsNeedReconnect) { in smb2_reconnect()
270 if (server->is_channel) { in smb2_reconnect()
272 ses->binding_chan = cifs_ses_find_chan(ses, server); in smb2_reconnect()
312 mod_delayed_work(cifsiod_wq, &server->reconnect, 0); in smb2_reconnect()
321 * BB Is flush done by server on drop of tcp session? Should we special in smb2_reconnect()
343 struct TCP_Server_Info *server, in fill_small_buf() argument
357 smb2_hdr_assemble(&spdu->sync_hdr, smb2_command, tcon, server); in fill_small_buf()
369 struct TCP_Server_Info *server, in __smb2_plain_req_init() argument
382 fill_small_buf(smb2_command, tcon, server, in __smb2_plain_req_init()
396 struct TCP_Server_Info *server, in smb2_plain_req_init() argument
401 rc = smb2_reconnect(smb2_command, tcon, server); in smb2_plain_req_init()
405 return __smb2_plain_req_init(smb2_command, tcon, server, request_buf, in smb2_plain_req_init()
410 struct TCP_Server_Info *server, in smb2_ioctl_req_init() argument
415 return __smb2_plain_req_init(SMB2_IOCTL, tcon, server, in smb2_ioctl_req_init()
418 return smb2_plain_req_init(SMB2_IOCTL, tcon, server, in smb2_ioctl_req_init()
477 /* copy up to max of first 100 bytes of server name to NetName field */ in build_netname_ctxt()
510 struct TCP_Server_Info *server, unsigned int *total_len) in assemble_neg_contexts() argument
540 if (server->compress_algorithm) { in assemble_neg_contexts()
553 server->hostname); in assemble_neg_contexts()
567 pr_warn_once("server sent bad preauth context\n"); in decode_preauth_context()
570 pr_warn_once("server sent invalid SaltLength\n"); in decode_preauth_context()
579 static void decode_compress_ctx(struct TCP_Server_Info *server, in decode_compress_ctx() argument
586 pr_warn_once("server sent bad compression cntxt\n"); in decode_compress_ctx()
597 server->compress_algorithm = ctxt->CompressionAlgorithms[0]; in decode_compress_ctx()
600 static int decode_encrypt_ctx(struct TCP_Server_Info *server, in decode_encrypt_ctx() argument
607 pr_warn_once("server sent bad crypto ctxt len\n"); in decode_encrypt_ctx()
618 cifs_dbg(VFS, "Server does not support requested encryption type (AES256 GCM)\n"); in decode_encrypt_ctx()
623 * e.g. if server only supported AES256_CCM (very unlikely) in decode_encrypt_ctx()
624 * or server supported no encryption types or had all disabled. in decode_encrypt_ctx()
628 * seal not requested by client, since server is allowed to in decode_encrypt_ctx()
631 server->cipher_type = 0; in decode_encrypt_ctx()
632 server->capabilities &= ~SMB2_GLOBAL_CAP_ENCRYPTION; in decode_encrypt_ctx()
633 pr_warn_once("Server does not support requested encryption types\n"); in decode_encrypt_ctx()
638 /* server returned a cipher we didn't ask for */ in decode_encrypt_ctx()
642 server->cipher_type = ctxt->Ciphers[0]; in decode_encrypt_ctx()
643 server->capabilities |= SMB2_GLOBAL_CAP_ENCRYPTION; in decode_encrypt_ctx()
648 struct TCP_Server_Info *server, in smb311_decode_neg_context() argument
683 rc = decode_encrypt_ctx(server, in smb311_decode_neg_context()
686 decode_compress_ctx(server, in smb311_decode_neg_context()
689 server->posix_ext_supported = true; in smb311_decode_neg_context()
790 struct TCP_Server_Info *server = cifs_ses_server(ses); in SMB2_negotiate() local
798 if (!server) { in SMB2_negotiate()
799 WARN(1, "%s: server is NULL!\n", __func__); in SMB2_negotiate()
803 rc = smb2_plain_req_init(SMB2_NEGOTIATE, NULL, server, in SMB2_negotiate()
810 memset(server->preauth_sha_hash, 0, SMB2_PREAUTH_HASH_SIZE); in SMB2_negotiate()
813 if (strcmp(server->vals->version_string, in SMB2_negotiate()
819 } else if (strcmp(server->vals->version_string, in SMB2_negotiate()
829 req->Dialects[0] = cpu_to_le16(server->vals->protocol_id); in SMB2_negotiate()
842 req->Capabilities = cpu_to_le32(server->vals->req_capabilities); in SMB2_negotiate()
847 if (server->vals->protocol_id == SMB20_PROT_ID) in SMB2_negotiate()
850 memcpy(req->ClientGUID, server->client_guid, in SMB2_negotiate()
852 if ((server->vals->protocol_id == SMB311_PROT_ID) || in SMB2_negotiate()
853 (strcmp(server->vals->version_string, in SMB2_negotiate()
855 assemble_neg_contexts(req, server, &total_len); in SMB2_negotiate()
864 rc = cifs_send_recv(xid, ses, server, in SMB2_negotiate()
873 …cifs_server_dbg(VFS, "Dialect not supported by server. Consider specifying vers=1.0 or vers=2.0 o… in SMB2_negotiate()
878 if (strcmp(server->vals->version_string, in SMB2_negotiate()
889 } else if (strcmp(server->vals->version_string, in SMB2_negotiate()
897 server->ops = &smb21_operations; in SMB2_negotiate()
898 server->vals = &smb21_values; in SMB2_negotiate()
900 server->ops = &smb311_operations; in SMB2_negotiate()
901 server->vals = &smb311_values; in SMB2_negotiate()
904 server->vals->protocol_id) { in SMB2_negotiate()
924 cifs_server_dbg(VFS, "Invalid dialect returned by server 0x%x\n", in SMB2_negotiate()
929 server->dialect = le16_to_cpu(rsp->DialectRevision); in SMB2_negotiate()
934 * server. in SMB2_negotiate()
936 memcpy(server->preauth_sha_hash, ses->preauth_sha_hash, in SMB2_negotiate()
940 server->negflavor = CIFS_NEGFLAVOR_EXTENDED; in SMB2_negotiate()
942 server->maxBuf = min_t(unsigned int, le32_to_cpu(rsp->MaxTransactSize), in SMB2_negotiate()
944 server->max_read = le32_to_cpu(rsp->MaxReadSize); in SMB2_negotiate()
945 server->max_write = le32_to_cpu(rsp->MaxWriteSize); in SMB2_negotiate()
946 server->sec_mode = le16_to_cpu(rsp->SecurityMode); in SMB2_negotiate()
947 if ((server->sec_mode & SMB2_SEC_MODE_FLAGS_ALL) != server->sec_mode) in SMB2_negotiate()
948 cifs_dbg(FYI, "Server returned unexpected security mode 0x%x\n", in SMB2_negotiate()
949 server->sec_mode); in SMB2_negotiate()
950 server->capabilities = le32_to_cpu(rsp->Capabilities); in SMB2_negotiate()
952 server->capabilities |= SMB2_NT_FIND | SMB2_LARGE_FILES; in SMB2_negotiate()
958 if (server->dialect == SMB30_PROT_ID && (server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION)) in SMB2_negotiate()
959 server->cipher_type = SMB2_ENCRYPTION_AES128_CCM; in SMB2_negotiate()
968 * We just found a server which sets blob length to zero expecting raw. in SMB2_negotiate()
972 server->sec_ntlmssp = true; in SMB2_negotiate()
975 rc = cifs_enable_signing(server, ses->sign); in SMB2_negotiate()
979 rc = decode_negTokenInit(security_blob, blob_length, server); in SMB2_negotiate()
988 rc = smb311_decode_neg_context(rsp, server, in SMB2_negotiate()
1005 struct TCP_Server_Info *server = tcon->ses->server; in smb3_validate_negotiate() local
1010 if (server->dialect == SMB311_PROT_ID) in smb3_validate_negotiate()
1029 cifs_tcon_dbg(VFS, "Unexpected null user (anonymous) auth flag sent by server\n"); in smb3_validate_negotiate()
1036 cpu_to_le32(server->vals->req_capabilities); in smb3_validate_negotiate()
1040 memcpy(pneg_inbuf->Guid, server->client_guid, in smb3_validate_negotiate()
1053 if (strcmp(server->vals->version_string, in smb3_validate_negotiate()
1061 } else if (strcmp(server->vals->version_string, in smb3_validate_negotiate()
1073 cpu_to_le16(server->vals->protocol_id); in smb3_validate_negotiate()
1086 * Old Windows versions or Netapp SMB server can return in smb3_validate_negotiate()
1089 cifs_tcon_dbg(VFS, "Server does not support validate negotiate\n"); in smb3_validate_negotiate()
1110 if (pneg_rsp->Dialect != cpu_to_le16(server->dialect)) in smb3_validate_negotiate()
1113 if (pneg_rsp->SecurityMode != cpu_to_le16(server->sec_mode)) in smb3_validate_negotiate()
1116 /* do not validate server guid because not saved at negprot time yet */ in smb3_validate_negotiate()
1119 SMB2_LARGE_FILES) != server->capabilities) in smb3_validate_negotiate()
1137 smb2_select_sectype(struct TCP_Server_Info *server, enum securityEnum requested) in smb2_select_sectype() argument
1146 if (server->sec_ntlmssp && in smb2_select_sectype()
1149 if ((server->sec_kerberos || server->sec_mskerberos) && in smb2_select_sectype()
1183 struct TCP_Server_Info *server = cifs_ses_server(ses); in SMB2_sess_alloc_buffer() local
1186 rc = smb2_plain_req_init(SMB2_SESSION_SETUP, NULL, server, in SMB2_sess_alloc_buffer()
1212 if (server->sign) in SMB2_sess_alloc_buffer()
1280 struct TCP_Server_Info *server = cifs_ses_server(ses); in SMB2_sess_establish_session() local
1282 mutex_lock(&server->srv_mutex); in SMB2_sess_establish_session()
1283 if (server->ops->generate_signingkey) { in SMB2_sess_establish_session()
1284 rc = server->ops->generate_signingkey(ses); in SMB2_sess_establish_session()
1288 mutex_unlock(&server->srv_mutex); in SMB2_sess_establish_session()
1292 if (!server->session_estab) { in SMB2_sess_establish_session()
1293 server->sequence_number = 0x2; in SMB2_sess_establish_session()
1294 server->session_estab = true; in SMB2_sess_establish_session()
1296 mutex_unlock(&server->srv_mutex); in SMB2_sess_establish_session()
1533 if (ses->server->dialect < SMB30_PROT_ID) { in SMB2_sess_auth_rawntlmssp_authenticate()
1588 struct TCP_Server_Info *server = cifs_ses_server(ses); in SMB2_sess_setup() local
1593 if (!server) { in SMB2_sess_setup()
1594 WARN(1, "%s: server is NULL!\n", __func__); in SMB2_sess_setup()
1612 * Initialize the session hash with the server one. in SMB2_sess_setup()
1614 memcpy(ses->preauth_sha_hash, server->preauth_sha_hash, in SMB2_sess_setup()
1634 struct TCP_Server_Info *server; in SMB2_logoff() local
1643 if (ses && (ses->server)) in SMB2_logoff()
1644 server = ses->server; in SMB2_logoff()
1652 rc = smb2_plain_req_init(SMB2_LOGOFF, NULL, ses->server, in SMB2_logoff()
1662 else if (server->sign) in SMB2_logoff()
1674 rc = cifs_send_recv(xid, ses, ses->server, in SMB2_logoff()
1691 #define MAX_SHARENAME_LENGTH (255 /* server */ + 80 /* share */ + 1 /* NULL */)
1716 struct TCP_Server_Info *server; in SMB2_tcon() local
1719 server = ses->server; in SMB2_tcon()
1723 if (!server || !tree) in SMB2_tcon()
1740 rc = smb2_plain_req_init(SMB2_TREE_CONNECT, tcon, server, in SMB2_tcon()
1766 if ((server->dialect == SMB311_PROT_ID) && in SMB2_tcon()
1780 rc = cifs_send_recv(xid, ses, server, in SMB2_tcon()
1824 !(server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION)) in SMB2_tcon()
1828 if (server->ops->validate_negotiate) in SMB2_tcon()
1829 rc = server->ops->validate_negotiate(xid, tcon); in SMB2_tcon()
1858 if (!ses || !(ses->server)) in SMB2_tdis()
1866 rc = smb2_plain_req_init(SMB2_TREE_DISCONNECT, tcon, ses->server, in SMB2_tdis()
1884 rc = cifs_send_recv(xid, ses, ses->server, in SMB2_tdis()
1988 smb2_parse_contexts(struct TCP_Server_Info *server, in smb2_parse_contexts() argument
2018 *oplock = server->ops->parse_lease_buf(cc, epoch, in smb2_parse_contexts()
2048 add_lease_context(struct TCP_Server_Info *server, struct kvec *iov, in add_lease_context() argument
2054 iov[num].iov_base = server->ops->create_lease_buf(lease_key, *oplock); in add_lease_context()
2057 iov[num].iov_len = server->vals->create_lease_size; in add_lease_context()
2064 server->vals->create_lease_size); in add_lease_context()
2087 * NB: Handle timeout defaults to 0, which allows server to choose in create_durable_v2_buf()
2504 struct TCP_Server_Info *server = cifs_pick_channel(ses); in smb311_posix_mkdir() local
2513 if (!ses || !server) { in smb311_posix_mkdir()
2519 rc = smb2_plain_req_init(SMB2_CREATE, tcon, server, in smb311_posix_mkdir()
2606 rc = cifs_send_recv(xid, ses, server, in smb311_posix_mkdir()
2636 SMB2_open_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_open_init() argument
2650 rc = smb2_plain_req_init(SMB2_CREATE, tcon, server, in SMB2_open_init()
2713 if ((!server->oplocks) || (tcon->no_lease)) in SMB2_open_init()
2716 if (!(server->capabilities & SMB2_GLOBAL_CAP_LEASING) || in SMB2_open_init()
2719 else if (!(server->capabilities & SMB2_GLOBAL_CAP_DIRECTORY_LEASING) && in SMB2_open_init()
2723 rc = add_lease_context(server, iov, &n_iov, in SMB2_open_init()
2731 if (server->capabilities & SMB2_GLOBAL_CAP_LEASING) { in SMB2_open_init()
2735 cpu_to_le32(server->vals->create_lease_size); in SMB2_open_init()
2839 struct TCP_Server_Info *server = cifs_pick_channel(ses); in SMB2_open() local
2847 if (!ses || !server) in SMB2_open()
2858 rc = SMB2_open_init(tcon, server, in SMB2_open()
2866 rc = cifs_send_recv(xid, ses, server, in SMB2_open()
2882 pr_warn_once("server share %s deleted\n", in SMB2_open()
2910 smb2_parse_contexts(server, rsp, &oparms->fid->epoch, in SMB2_open()
2919 SMB2_ioctl_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_ioctl_init() argument
2931 rc = smb2_ioctl_req_init(opcode, tcon, server, in SMB2_ioctl_init()
2982 * ioctls it may be useful to allow server to send more. No point in SMB2_ioctl_init()
2983 * limiting what the server can send as long as fits in one credit in SMB2_ioctl_init()
3034 struct TCP_Server_Info *server; in SMB2_ioctl() local
3057 server = cifs_pick_channel(ses); in SMB2_ioctl()
3058 if (!server) in SMB2_ioctl()
3069 rc = SMB2_ioctl_init(tcon, server, in SMB2_ioctl()
3075 rc = cifs_send_recv(xid, ses, server, in SMB2_ioctl()
3108 goto ioctl_exit; /* server returned no data */ in SMB2_ioctl()
3164 SMB2_close_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_close_init() argument
3173 rc = smb2_plain_req_init(SMB2_CLOSE, tcon, server, in SMB2_close_init()
3205 struct TCP_Server_Info *server = cifs_pick_channel(ses); in __SMB2_close() local
3215 if (!ses || !server) in __SMB2_close()
3226 /* check if need to ask server to return timestamps in close response */ in __SMB2_close()
3231 rc = SMB2_close_init(tcon, server, in __SMB2_close()
3237 rc = cifs_send_recv(xid, ses, server, in __SMB2_close()
3306 cifs_dbg(VFS, "Invalid server response, bad offset to data\n"); in smb2_validate_iov()
3338 SMB2_query_info_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_query_info_init() argument
3349 rc = smb2_plain_req_init(SMB2_QUERY_INFO, tcon, server, in SMB2_query_info_init()
3394 struct TCP_Server_Info *server; in query_info() local
3402 server = cifs_pick_channel(ses); in query_info()
3403 if (!server) in query_info()
3414 rc = SMB2_query_info_init(tcon, server, in query_info()
3424 rc = cifs_send_recv(xid, ses, server, in query_info()
3523 struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_notify_init() argument
3532 rc = smb2_plain_req_init(SMB2_CHANGE_NOTIFY, tcon, server, in SMB2_notify_init()
3560 struct TCP_Server_Info *server = cifs_pick_channel(ses); in SMB2_change_notify() local
3569 if (!ses || !server) in SMB2_change_notify()
3580 rc = SMB2_notify_init(xid, &rqst, tcon, server, in SMB2_change_notify()
3588 rc = cifs_send_recv(xid, ses, server, in SMB2_change_notify()
3610 * rather in the fact that the server sent one and that server->lstrp
3618 struct TCP_Server_Info *server = mid->callback_data; in smb2_echo_callback() local
3625 credits.instance = server->reconnect_instance; in smb2_echo_callback()
3629 add_credits(server, &credits, CIFS_ECHO_OP); in smb2_echo_callback()
3634 struct TCP_Server_Info *server = container_of(work, in smb2_reconnect_server() local
3645 mutex_lock(&server->reconnect_mutex); in smb2_reconnect_server()
3651 list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) { in smb2_reconnect_server()
3670 * Get the reference to server struct to be sure that the last call of in smb2_reconnect_server()
3671 * cifs_put_tcon() in the loop below won't release the server pointer. in smb2_reconnect_server()
3674 server->srv_count++; in smb2_reconnect_server()
3679 rc = smb2_reconnect(SMB2_INTERNAL_CMD, tcon, server); in smb2_reconnect_server()
3693 queue_delayed_work(cifsiod_wq, &server->reconnect, 2 * HZ); in smb2_reconnect_server()
3694 mutex_unlock(&server->reconnect_mutex); in smb2_reconnect_server()
3698 cifs_put_tcp_session(server, 1); in smb2_reconnect_server()
3702 SMB2_echo(struct TCP_Server_Info *server) in SMB2_echo() argument
3713 if (server->tcpStatus == CifsNeedNegotiate) { in SMB2_echo()
3715 mod_delayed_work(cifsiod_wq, &server->reconnect, 0); in SMB2_echo()
3719 rc = smb2_plain_req_init(SMB2_ECHO, NULL, server, in SMB2_echo()
3729 rc = cifs_call_async(server, &rqst, NULL, smb2_echo_callback, NULL, in SMB2_echo()
3730 server, CIFS_ECHO_OP, NULL); in SMB2_echo()
3747 struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_flush_init() argument
3755 rc = smb2_plain_req_init(SMB2_FLUSH, tcon, server, in SMB2_flush_init()
3777 struct TCP_Server_Info *server = cifs_pick_channel(ses); in SMB2_flush() local
3783 if (!ses || !(ses->server)) in SMB2_flush()
3794 rc = SMB2_flush_init(xid, &rqst, tcon, server, in SMB2_flush()
3800 rc = cifs_send_recv(xid, ses, server, in SMB2_flush()
3829 struct TCP_Server_Info *server = io_parms->server; in smb2_new_read_req() local
3831 rc = smb2_plain_req_init(SMB2_READ, io_parms->tcon, server, in smb2_new_read_req()
3836 if (server == NULL) in smb2_new_read_req()
3860 if (server->rdma && rdata && !server->sign && in smb2_new_read_req()
3861 rdata->bytes >= server->smbd_conn->rdma_readwrite_threshold) { in smb2_new_read_req()
3864 bool need_invalidate = server->dialect == SMB30_PROT_ID; in smb2_new_read_req()
3867 server->smbd_conn, rdata->pages, in smb2_new_read_req()
3921 struct TCP_Server_Info *server = rdata->server; in smb2_readv_callback() local
3933 WARN_ONCE(rdata->server != mid->server, in smb2_readv_callback()
3934 "rdata server %p != mid server %p", in smb2_readv_callback()
3935 rdata->server, mid->server); in smb2_readv_callback()
3944 credits.instance = server->reconnect_instance; in smb2_readv_callback()
3946 if (server->sign && !mid->decrypted) { in smb2_readv_callback()
3949 rc = smb2_verify_signature(&rqst, server); in smb2_readv_callback()
3961 if (server->sign && rdata->got_bytes) in smb2_readv_callback()
3970 credits.instance = server->reconnect_instance; in smb2_readv_callback()
4000 add_credits(server, &credits, 0); in smb2_readv_callback()
4013 struct TCP_Server_Info *server; in smb2_async_readv() local
4020 if (!rdata->server) in smb2_async_readv()
4021 rdata->server = cifs_pick_channel(tcon->ses); in smb2_async_readv()
4024 io_parms.server = server = rdata->server; in smb2_async_readv()
4049 rc = adjust_credits(server, &rdata->credits, rdata->bytes); in smb2_async_readv()
4057 rc = cifs_call_async(server, &rqst, in smb2_async_readv()
4089 if (!io_parms->server) in SMB2_read()
4090 io_parms->server = cifs_pick_channel(io_parms->tcon->ses); in SMB2_read()
4107 rc = cifs_send_recv(xid, ses, io_parms->server, in SMB2_read()
4164 struct TCP_Server_Info *server = wdata->server; in smb2_writev_callback() local
4169 WARN_ONCE(wdata->server != mid->server, in smb2_writev_callback()
4170 "wdata server %p != mid server %p", in smb2_writev_callback()
4171 wdata->server, mid->server); in smb2_writev_callback()
4176 credits.instance = server->reconnect_instance; in smb2_writev_callback()
4177 wdata->result = smb2_check_receive(mid, server, 0); in smb2_writev_callback()
4184 * by the server is greater than bytes requested by the in smb2_writev_callback()
4202 credits.instance = server->reconnect_instance; in smb2_writev_callback()
4238 add_credits(server, &credits, 0); in smb2_writev_callback()
4250 struct TCP_Server_Info *server = wdata->server; in smb2_async_writev() local
4255 if (!wdata->server) in smb2_async_writev()
4256 server = wdata->server = cifs_pick_channel(tcon->ses); in smb2_async_writev()
4258 rc = smb2_plain_req_init(SMB2_WRITE, tcon, server, in smb2_async_writev()
4283 * If we want to do a server RDMA read, fill in and append in smb2_async_writev()
4286 if (server->rdma && !server->sign && wdata->bytes >= in smb2_async_writev()
4287 server->smbd_conn->rdma_readwrite_threshold) { in smb2_async_writev()
4290 bool need_invalidate = server->dialect == SMB30_PROT_ID; in smb2_async_writev()
4293 server->smbd_conn, wdata->pages, in smb2_async_writev()
4355 rc = adjust_credits(server, &wdata->credits, wdata->bytes); in smb2_async_writev()
4363 rc = cifs_call_async(server, &rqst, NULL, smb2_writev_callback, NULL, in smb2_async_writev()
4397 struct TCP_Server_Info *server; in SMB2_write() local
4404 if (!io_parms->server) in SMB2_write()
4405 io_parms->server = cifs_pick_channel(io_parms->tcon->ses); in SMB2_write()
4406 server = io_parms->server; in SMB2_write()
4407 if (server == NULL) in SMB2_write()
4410 rc = smb2_plain_req_init(SMB2_WRITE, io_parms->tcon, server, in SMB2_write()
4443 rc = cifs_send_recv(xid, io_parms->tcon->ses, server, in SMB2_write()
4619 struct TCP_Server_Info *server, in SMB2_query_directory_init() argument
4634 rc = smb2_plain_req_init(SMB2_QUERY_DIRECTORY, tcon, server, in SMB2_query_directory_init()
4670 output_size = min_t(unsigned int, output_size, server->maxBuf); in SMB2_query_directory_init()
4778 struct TCP_Server_Info *server = cifs_pick_channel(ses); in SMB2_query_directory() local
4781 if (!ses || !(ses->server)) in SMB2_query_directory()
4792 rc = SMB2_query_directory_init(xid, tcon, server, in SMB2_query_directory()
4799 rc = cifs_send_recv(xid, ses, server, in SMB2_query_directory()
4837 SMB2_set_info_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_set_info_init() argument
4848 rc = smb2_plain_req_init(SMB2_SET_INFO, tcon, server, in SMB2_set_info_init()
4900 struct TCP_Server_Info *server = cifs_pick_channel(ses); in send_set_info() local
4903 if (!ses || !server) in send_set_info()
4920 rc = SMB2_set_info_init(tcon, server, in send_set_info()
4930 rc = cifs_send_recv(xid, ses, server, in send_set_info()
4994 struct TCP_Server_Info *server = cifs_pick_channel(ses); in SMB2_oplock_break() local
5002 rc = smb2_plain_req_init(SMB2_OPLOCK_BREAK, tcon, server, in SMB2_oplock_break()
5024 rc = cifs_send_recv(xid, ses, server, in SMB2_oplock_break()
5069 struct TCP_Server_Info *server, in build_qfs_info_req() argument
5079 if ((tcon->ses == NULL) || server == NULL) in build_qfs_info_req()
5082 rc = smb2_plain_req_init(SMB2_QUERY_INFO, tcon, server, in build_qfs_info_req()
5113 struct TCP_Server_Info *server = cifs_pick_channel(ses); in SMB311_posix_qfs_info() local
5117 rc = build_qfs_info_req(&iov, tcon, server, in SMB311_posix_qfs_info()
5131 rc = cifs_send_recv(xid, ses, server, in SMB311_posix_qfs_info()
5164 struct TCP_Server_Info *server = cifs_pick_channel(ses); in SMB2_QFS_info() local
5168 rc = build_qfs_info_req(&iov, tcon, server, in SMB2_QFS_info()
5182 rc = cifs_send_recv(xid, ses, server, in SMB2_QFS_info()
5215 struct TCP_Server_Info *server = cifs_pick_channel(ses); in SMB2_QFS_attr() local
5236 rc = build_qfs_info_req(&iov, tcon, server, in SMB2_QFS_attr()
5249 rc = cifs_send_recv(xid, ses, server, in SMB2_QFS_attr()
5303 struct TCP_Server_Info *server = cifs_pick_channel(tcon->ses); in smb2_lockv() local
5307 rc = smb2_plain_req_init(SMB2_LOCK, tcon, server, in smb2_lockv()
5334 rc = cifs_send_recv(xid, tcon->ses, server, in smb2_lockv()
5380 struct TCP_Server_Info *server = cifs_pick_channel(tcon->ses); in SMB2_lease_break() local
5383 rc = smb2_plain_req_init(SMB2_OPLOCK_BREAK, tcon, server, in SMB2_lease_break()
5407 rc = cifs_send_recv(xid, ses, server, in SMB2_lease_break()