Lines Matching full:tcon
86 int smb3_encryption_required(const struct cifs_tcon *tcon) in smb3_encryption_required() argument
88 if (!tcon || !tcon->ses) in smb3_encryption_required()
90 if ((tcon->ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA) || in smb3_encryption_required()
91 (tcon->share_flags & SHI1005_FLAGS_ENCRYPT_DATA)) in smb3_encryption_required()
93 if (tcon->seal && in smb3_encryption_required()
94 (tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION)) in smb3_encryption_required()
101 const struct cifs_tcon *tcon, in smb2_hdr_assemble() argument
122 if (!tcon) in smb2_hdr_assemble()
131 shdr->TreeId = tcon->tid; in smb2_hdr_assemble()
133 if (tcon->ses) in smb2_hdr_assemble()
134 shdr->SessionId = tcon->ses->Suid; in smb2_hdr_assemble()
146 /* if (tcon->share_flags & SHI1005_FLAGS_DFS) in smb2_hdr_assemble()
149 if (server && server->sign && !smb3_encryption_required(tcon)) in smb2_hdr_assemble()
156 smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon, in smb2_reconnect() argument
165 * SMB2s NegProt, SessSetup, Logoff do not have tcon yet so in smb2_reconnect()
169 if (tcon == NULL) in smb2_reconnect()
175 if (tcon->tidStatus == CifsExiting) { in smb2_reconnect()
178 * (and ulogoff which does not have tcon) in smb2_reconnect()
189 if ((!tcon->ses) || (tcon->ses->status == CifsExiting) || in smb2_reconnect()
190 (!tcon->ses->server) || !server) in smb2_reconnect()
193 ses = tcon->ses; in smb2_reconnect()
238 if (!tcon->retry) { in smb2_reconnect()
245 if (!tcon->ses->need_reconnect && !tcon->need_reconnect) in smb2_reconnect()
254 mutex_lock(&tcon->ses->session_mutex); in smb2_reconnect()
263 mutex_unlock(&tcon->ses->session_mutex); in smb2_reconnect()
275 rc = cifs_negotiate_protocol(0, tcon->ses); in smb2_reconnect()
276 if (!rc && tcon->ses->need_reconnect) { in smb2_reconnect()
277 rc = cifs_setup_session(0, tcon->ses, nls_codepage); in smb2_reconnect()
278 if ((rc == -EACCES) && !tcon->retry) { in smb2_reconnect()
282 mutex_unlock(&tcon->ses->session_mutex); in smb2_reconnect()
292 if (rc || !tcon->need_reconnect) { in smb2_reconnect()
293 mutex_unlock(&tcon->ses->session_mutex); in smb2_reconnect()
297 cifs_mark_open_files_invalid(tcon); in smb2_reconnect()
298 if (tcon->use_persistent) in smb2_reconnect()
299 tcon->need_reopen_files = true; in smb2_reconnect()
301 rc = cifs_tree_connect(0, tcon, nls_codepage); in smb2_reconnect()
302 mutex_unlock(&tcon->ses->session_mutex); in smb2_reconnect()
304 cifs_dbg(FYI, "reconnect tcon rc = %d\n", rc); in smb2_reconnect()
306 /* If sess reconnected but tcon didn't, something strange ... */ in smb2_reconnect()
307 pr_warn_once("reconnect tcon failed rc = %d\n", rc); in smb2_reconnect()
342 fill_small_buf(__le16 smb2_command, struct cifs_tcon *tcon, in fill_small_buf() argument
357 smb2_hdr_assemble(&spdu->sync_hdr, smb2_command, tcon, server); in fill_small_buf()
368 static int __smb2_plain_req_init(__le16 smb2_command, struct cifs_tcon *tcon, in __smb2_plain_req_init() argument
382 fill_small_buf(smb2_command, tcon, server, in __smb2_plain_req_init()
386 if (tcon != NULL) { in __smb2_plain_req_init()
388 cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_sent[com_code]); in __smb2_plain_req_init()
389 cifs_stats_inc(&tcon->num_smbs_sent); in __smb2_plain_req_init()
395 static int smb2_plain_req_init(__le16 smb2_command, struct cifs_tcon *tcon, 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()
409 static int smb2_ioctl_req_init(u32 opcode, struct cifs_tcon *tcon, 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()
864 * No tcon so can't do in SMB2_negotiate()
865 * cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_fail[SMB2...]); in SMB2_negotiate()
986 int smb3_validate_negotiate(const unsigned int xid, struct cifs_tcon *tcon) in smb3_validate_negotiate() argument
993 struct TCP_Server_Info *server = tcon->ses->server; in smb3_validate_negotiate()
1008 if (tcon->ses->session_flags & SMB2_SESSION_FLAG_IS_GUEST) in smb3_validate_negotiate()
1011 if (tcon->ses->user_name == NULL) { in smb3_validate_negotiate()
1016 if (tcon->ses->session_flags & SMB2_SESSION_FLAG_IS_NULL) in smb3_validate_negotiate()
1028 if (tcon->ses->sign) in smb3_validate_negotiate()
1065 rc = SMB2_ioctl(xid, tcon, NO_FILE_ID, NO_FILE_ID, in smb3_validate_negotiate()
1642 /* since no tcon, smb2_init can not do this, so do here */ in SMB2_logoff()
1663 * No tcon so can't do in SMB2_logoff()
1664 * cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_fail[SMB2...]); in SMB2_logoff()
1671 static inline void cifs_stats_fail_inc(struct cifs_tcon *tcon, uint16_t code) in cifs_stats_fail_inc() argument
1673 cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_failed[code]); in cifs_stats_fail_inc()
1679 static inline void init_copy_chunk_defaults(struct cifs_tcon *tcon) in init_copy_chunk_defaults() argument
1681 tcon->max_chunks = 256; in init_copy_chunk_defaults()
1682 tcon->max_bytes_chunk = 1048576; in init_copy_chunk_defaults()
1683 tcon->max_bytes_copy = 16777216; in init_copy_chunk_defaults()
1688 struct cifs_tcon *tcon, const struct nls_table *cp) in SMB2_tcon() argument
1706 cifs_dbg(FYI, "TCON\n"); in SMB2_tcon()
1723 tcon->tid = 0; in SMB2_tcon()
1724 atomic_set(&tcon->num_remote_opens, 0); in SMB2_tcon()
1725 rc = smb2_plain_req_init(SMB2_TREE_CONNECT, tcon, server, in SMB2_tcon()
1732 if (smb3_encryption_required(tcon)) in SMB2_tcon()
1747 * 3.11 tcon req must be signed if not encrypted. See MS-SMB2 3.2.4.1.1 in SMB2_tcon()
1752 !smb3_encryption_required(tcon) && in SMB2_tcon()
1769 trace_smb3_tcon(xid, tcon->tid, ses->Suid, tree, rc); in SMB2_tcon()
1771 if (tcon) { in SMB2_tcon()
1772 cifs_stats_fail_inc(tcon, SMB2_TREE_CONNECT_HE); in SMB2_tcon()
1773 tcon->need_reconnect = true; in SMB2_tcon()
1783 tcon->pipe = true; in SMB2_tcon()
1787 tcon->print = true; in SMB2_tcon()
1796 tcon->share_flags = le32_to_cpu(rsp->ShareFlags); in SMB2_tcon()
1797 tcon->capabilities = rsp->Capabilities; /* we keep caps little endian */ in SMB2_tcon()
1798 tcon->maximal_access = le32_to_cpu(rsp->MaximalAccess); in SMB2_tcon()
1799 tcon->tidStatus = CifsGood; in SMB2_tcon()
1800 tcon->need_reconnect = false; in SMB2_tcon()
1801 tcon->tid = rsp->sync_hdr.TreeId; in SMB2_tcon()
1802 strlcpy(tcon->treeName, tree, sizeof(tcon->treeName)); in SMB2_tcon()
1805 ((tcon->share_flags & SHI1005_FLAGS_DFS) == 0)) in SMB2_tcon()
1808 if (tcon->seal && in SMB2_tcon()
1812 init_copy_chunk_defaults(tcon); in SMB2_tcon()
1814 rc = server->ops->validate_negotiate(xid, tcon); in SMB2_tcon()
1829 SMB2_tdis(const unsigned int xid, struct cifs_tcon *tcon) in SMB2_tdis() argument
1834 struct cifs_ses *ses = tcon->ses; in SMB2_tdis()
1846 if ((tcon->need_reconnect) || (tcon->ses->need_reconnect)) in SMB2_tdis()
1849 close_shroot_lease(&tcon->crfid); in SMB2_tdis()
1851 rc = smb2_plain_req_init(SMB2_TREE_DISCONNECT, tcon, ses->server, in SMB2_tdis()
1857 if (smb3_encryption_required(tcon)) in SMB2_tdis()
1873 cifs_stats_fail_inc(tcon, SMB2_TREE_DISCONNECT_HE); in SMB2_tdis()
2078 buf->dcontext.Timeout = cpu_to_le32(oparms->tcon->handle_timeout); in create_durable_v2_buf()
2468 umode_t mode, struct cifs_tcon *tcon, in smb311_posix_mkdir() argument
2475 struct cifs_ses *ses = tcon->ses; in smb311_posix_mkdir()
2504 rc = smb2_plain_req_init(SMB2_CREATE, tcon, server, in smb311_posix_mkdir()
2510 if (smb3_encryption_required(tcon)) in smb311_posix_mkdir()
2535 if (tcon->share_flags & SHI1005_FLAGS_DFS) { in smb311_posix_mkdir()
2541 tcon->treeName, utf16_path); in smb311_posix_mkdir()
2574 if (tcon->posix_extensions) { in smb311_posix_mkdir()
2588 trace_smb3_posix_mkdir_enter(xid, tcon->tid, ses->Suid, CREATE_NOT_FILE, in smb311_posix_mkdir()
2594 cifs_stats_fail_inc(tcon, SMB2_CREATE_HE); in smb311_posix_mkdir()
2595 trace_smb3_posix_mkdir_err(xid, tcon->tid, ses->Suid, in smb311_posix_mkdir()
2602 trace_smb3_posix_mkdir_done(xid, rsp->PersistentFileId, tcon->tid, in smb311_posix_mkdir()
2606 SMB2_close(xid, tcon, rsp->PersistentFileId, rsp->VolatileFileId); in smb311_posix_mkdir()
2621 SMB2_open_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_open_init() argument
2635 rc = smb2_plain_req_init(SMB2_CREATE, tcon, server, in SMB2_open_init()
2667 if (tcon->share_flags & SHI1005_FLAGS_DFS) { in SMB2_open_init()
2673 tcon->treeName, path); in SMB2_open_init()
2698 if ((!server->oplocks) || (tcon->no_lease)) in SMB2_open_init()
2724 tcon->use_persistent); in SMB2_open_init()
2729 if (tcon->posix_extensions) { in SMB2_open_init()
2742 if (tcon->snapshot_time) { in SMB2_open_init()
2751 rc = add_twarp_context(iov, &n_iov, tcon->snapshot_time); in SMB2_open_init()
2822 struct cifs_tcon *tcon = oparms->tcon; in SMB2_open() local
2823 struct cifs_ses *ses = tcon->ses; in SMB2_open()
2835 if (smb3_encryption_required(tcon)) in SMB2_open()
2843 rc = SMB2_open_init(tcon, server, in SMB2_open()
2848 trace_smb3_open_enter(xid, tcon->tid, tcon->ses->Suid, in SMB2_open()
2857 cifs_stats_fail_inc(tcon, SMB2_CREATE_HE); in SMB2_open()
2864 trace_smb3_open_err(xid, tcon->tid, ses->Suid, in SMB2_open()
2868 tcon->treeName); in SMB2_open()
2869 tcon->need_reconnect = true; in SMB2_open()
2873 trace_smb3_open_done(xid, rsp->PersistentFileId, tcon->tid, in SMB2_open()
2877 atomic_inc(&tcon->num_remote_opens); in SMB2_open()
2904 SMB2_ioctl_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_ioctl_init() argument
2916 rc = smb2_ioctl_req_init(opcode, tcon, server, in SMB2_ioctl_init()
3011 SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid, in SMB2_ioctl() argument
3035 if (!tcon) in SMB2_ioctl()
3038 ses = tcon->ses; in SMB2_ioctl()
3046 if (smb3_encryption_required(tcon)) in SMB2_ioctl()
3054 rc = SMB2_ioctl_init(tcon, server, in SMB2_ioctl()
3066 trace_smb3_fsctl_err(xid, persistent_fid, tcon->tid, in SMB2_ioctl()
3070 cifs_stats_fail_inc(tcon, SMB2_IOCTL_HE); in SMB2_ioctl()
3075 cifs_stats_fail_inc(tcon, SMB2_IOCTL_HE); in SMB2_ioctl()
3080 cifs_stats_fail_inc(tcon, SMB2_IOCTL_HE); in SMB2_ioctl()
3127 SMB2_set_compression(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_set_compression() argument
3137 rc = SMB2_ioctl(xid, tcon, persistent_fid, volatile_fid, in SMB2_set_compression()
3149 SMB2_close_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_close_init() argument
3158 rc = smb2_plain_req_init(SMB2_CLOSE, tcon, server, in SMB2_close_init()
3183 __SMB2_close(const unsigned int xid, struct cifs_tcon *tcon, in __SMB2_close() argument
3189 struct cifs_ses *ses = tcon->ses; in __SMB2_close()
3203 if (smb3_encryption_required(tcon)) in __SMB2_close()
3215 trace_smb3_close_enter(xid, persistent_fid, tcon->tid, ses->Suid); in __SMB2_close()
3216 rc = SMB2_close_init(tcon, server, in __SMB2_close()
3227 cifs_stats_fail_inc(tcon, SMB2_CLOSE_HE); in __SMB2_close()
3228 trace_smb3_close_err(xid, persistent_fid, tcon->tid, ses->Suid, in __SMB2_close()
3232 trace_smb3_close_done(xid, persistent_fid, tcon->tid, in __SMB2_close()
3242 atomic_dec(&tcon->num_remote_opens); in __SMB2_close()
3251 tmp_rc = smb2_handle_cancelled_close(tcon, persistent_fid, in __SMB2_close()
3261 SMB2_close(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_close() argument
3264 return __SMB2_close(xid, tcon, persistent_fid, volatile_fid, NULL); in SMB2_close()
3323 SMB2_query_info_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_query_info_init() argument
3334 rc = smb2_plain_req_init(SMB2_QUERY_INFO, tcon, server, in SMB2_query_info_init()
3367 query_info(const unsigned int xid, struct cifs_tcon *tcon, in query_info() argument
3378 struct cifs_ses *ses = tcon->ses; in query_info()
3391 if (smb3_encryption_required(tcon)) in query_info()
3399 rc = SMB2_query_info_init(tcon, server, in query_info()
3406 trace_smb3_query_info_enter(xid, persistent_fid, tcon->tid, in query_info()
3414 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE); in query_info()
3415 trace_smb3_query_info_err(xid, persistent_fid, tcon->tid, in query_info()
3420 trace_smb3_query_info_done(xid, persistent_fid, tcon->tid, in query_info()
3454 int SMB2_query_info(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_query_info() argument
3457 return query_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_query_info()
3465 SMB311_posix_query_info(const unsigned int xid, struct cifs_tcon *tcon, in SMB311_posix_query_info() argument
3472 return query_info(xid, tcon, persistent_fid, volatile_fid, in SMB311_posix_query_info()
3478 SMB2_query_acl(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_query_acl() argument
3485 return query_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_query_acl()
3491 SMB2_get_srv_num(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_get_srv_num() argument
3494 return query_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_get_srv_num()
3508 struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_notify_init() argument
3517 rc = smb2_plain_req_init(SMB2_CHANGE_NOTIFY, tcon, server, in SMB2_notify_init()
3540 SMB2_change_notify(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_change_notify() argument
3544 struct cifs_ses *ses = tcon->ses; in SMB2_change_notify()
3557 if (smb3_encryption_required(tcon)) in SMB2_change_notify()
3565 rc = SMB2_notify_init(xid, &rqst, tcon, server, in SMB2_change_notify()
3571 trace_smb3_notify_enter(xid, persistent_fid, tcon->tid, ses->Suid, in SMB2_change_notify()
3577 cifs_stats_fail_inc(tcon, SMB2_CHANGE_NOTIFY_HE); in SMB2_change_notify()
3578 trace_smb3_notify_err(xid, persistent_fid, tcon->tid, ses->Suid, in SMB2_change_notify()
3581 trace_smb3_notify_done(xid, persistent_fid, tcon->tid, in SMB2_change_notify()
3622 struct cifs_tcon *tcon, *tcon2; in smb2_reconnect_server() local
3629 /* Prevent simultaneous reconnects that can corrupt tcon->rlist list */ in smb2_reconnect_server()
3637 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) { in smb2_reconnect_server()
3638 if (tcon->need_reconnect || tcon->need_reopen_files) { in smb2_reconnect_server()
3639 tcon->tc_count++; in smb2_reconnect_server()
3640 list_add_tail(&tcon->rlist, &tmp_list); in smb2_reconnect_server()
3663 list_for_each_entry_safe(tcon, tcon2, &tmp_list, rlist) { in smb2_reconnect_server()
3664 rc = smb2_reconnect(SMB2_INTERNAL_CMD, tcon, server); in smb2_reconnect_server()
3666 cifs_reopen_persistent_handles(tcon); in smb2_reconnect_server()
3669 list_del_init(&tcon->rlist); in smb2_reconnect_server()
3670 if (tcon->ipc) in smb2_reconnect_server()
3671 cifs_put_smb_ses(tcon->ses); in smb2_reconnect_server()
3673 cifs_put_tcon(tcon); in smb2_reconnect_server()
3732 struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_flush_init() argument
3740 rc = smb2_plain_req_init(SMB2_FLUSH, tcon, server, in SMB2_flush_init()
3755 SMB2_flush(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid, in SMB2_flush() argument
3758 struct cifs_ses *ses = tcon->ses; in SMB2_flush()
3771 if (smb3_encryption_required(tcon)) in SMB2_flush()
3779 rc = SMB2_flush_init(xid, &rqst, tcon, server, in SMB2_flush()
3784 trace_smb3_flush_enter(xid, persistent_fid, tcon->tid, ses->Suid); in SMB2_flush()
3789 cifs_stats_fail_inc(tcon, SMB2_FLUSH_HE); in SMB2_flush()
3790 trace_smb3_flush_err(xid, persistent_fid, tcon->tid, ses->Suid, in SMB2_flush()
3793 trace_smb3_flush_done(xid, persistent_fid, tcon->tid, in SMB2_flush()
3816 rc = smb2_plain_req_init(SMB2_READ, io_parms->tcon, server, in smb2_new_read_req()
3838 io_parms->tcon->tid, io_parms->tcon->ses->Suid, in smb2_new_read_req()
3905 struct cifs_tcon *tcon = tlink_tcon(rdata->cfile->tlink); in smb2_readv_callback() local
3941 cifs_stats_bytes_read(tcon, rdata->got_bytes); in smb2_readv_callback()
3951 cifs_stats_bytes_read(tcon, rdata->got_bytes); in smb2_readv_callback()
3972 cifs_stats_fail_inc(tcon, SMB2_READ_HE); in smb2_readv_callback()
3975 tcon->tid, tcon->ses->Suid, rdata->offset, in smb2_readv_callback()
3980 tcon->tid, tcon->ses->Suid, in smb2_readv_callback()
3999 struct cifs_tcon *tcon = tlink_tcon(rdata->cfile->tlink); in smb2_async_readv() local
4006 rdata->server = cifs_pick_channel(tcon->ses); in smb2_async_readv()
4008 io_parms.tcon = tlink_tcon(rdata->cfile->tlink); in smb2_async_readv()
4021 if (smb3_encryption_required(io_parms.tcon)) in smb2_async_readv()
4049 cifs_stats_fail_inc(io_parms.tcon, SMB2_READ_HE); in smb2_async_readv()
4051 io_parms.tcon->tid, in smb2_async_readv()
4052 io_parms.tcon->ses->Suid, in smb2_async_readv()
4073 struct cifs_ses *ses = io_parms->tcon->ses; in SMB2_read()
4076 io_parms->server = cifs_pick_channel(io_parms->tcon->ses); in SMB2_read()
4083 if (smb3_encryption_required(io_parms->tcon)) in SMB2_read()
4099 cifs_stats_fail_inc(io_parms->tcon, SMB2_READ_HE); in SMB2_read()
4102 io_parms->tcon->tid, ses->Suid, in SMB2_read()
4107 io_parms->tcon->tid, ses->Suid, in SMB2_read()
4114 io_parms->tcon->tid, ses->Suid, in SMB2_read()
4149 struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink); in smb2_writev_callback() local
4208 cifs_stats_fail_inc(tcon, SMB2_WRITE_HE); in smb2_writev_callback()
4211 tcon->tid, tcon->ses->Suid, wdata->offset, in smb2_writev_callback()
4215 tcon->treeName); in smb2_writev_callback()
4219 tcon->tid, tcon->ses->Suid, in smb2_writev_callback()
4235 struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink); in smb2_async_writev() local
4242 server = wdata->server = cifs_pick_channel(tcon->ses); in smb2_async_writev()
4244 rc = smb2_plain_req_init(SMB2_WRITE, tcon, server, in smb2_async_writev()
4249 if (smb3_encryption_required(tcon)) in smb2_async_writev()
4266 tcon->tid, tcon->ses->Suid, wdata->offset, wdata->bytes); in smb2_async_writev()
4355 tcon->tid, tcon->ses->Suid, wdata->offset, in smb2_async_writev()
4358 cifs_stats_fail_inc(tcon, SMB2_WRITE_HE); in smb2_async_writev()
4392 io_parms->server = cifs_pick_channel(io_parms->tcon->ses); in SMB2_write()
4397 rc = smb2_plain_req_init(SMB2_WRITE, io_parms->tcon, server, in SMB2_write()
4402 if (smb3_encryption_required(io_parms->tcon)) in SMB2_write()
4419 io_parms->tcon->tid, io_parms->tcon->ses->Suid, in SMB2_write()
4430 rc = cifs_send_recv(xid, io_parms->tcon->ses, server, in SMB2_write()
4437 io_parms->tcon->tid, in SMB2_write()
4438 io_parms->tcon->ses->Suid, in SMB2_write()
4440 cifs_stats_fail_inc(io_parms->tcon, SMB2_WRITE_HE); in SMB2_write()
4445 io_parms->tcon->tid, in SMB2_write()
4446 io_parms->tcon->ses->Suid, in SMB2_write()
4605 struct cifs_tcon *tcon, in SMB2_query_directory_init() argument
4621 rc = smb2_plain_req_init(SMB2_QUERY_DIRECTORY, tcon, server, in SMB2_query_directory_init()
4668 trace_smb3_query_dir_enter(xid, persistent_fid, tcon->tid, in SMB2_query_directory_init()
4669 tcon->ses->Suid, index, output_size); in SMB2_query_directory_init()
4682 smb2_parse_query_directory(struct cifs_tcon *tcon, in smb2_parse_query_directory() argument
4754 SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_query_directory() argument
4764 struct cifs_ses *ses = tcon->ses; in SMB2_query_directory()
4771 if (smb3_encryption_required(tcon)) in SMB2_query_directory()
4779 rc = SMB2_query_directory_init(xid, tcon, server, in SMB2_query_directory()
4794 tcon->tid, tcon->ses->Suid, index, 0); in SMB2_query_directory()
4798 trace_smb3_query_dir_err(xid, persistent_fid, tcon->tid, in SMB2_query_directory()
4799 tcon->ses->Suid, index, 0, rc); in SMB2_query_directory()
4800 cifs_stats_fail_inc(tcon, SMB2_QUERY_DIRECTORY_HE); in SMB2_query_directory()
4805 rc = smb2_parse_query_directory(tcon, &rsp_iov, resp_buftype, in SMB2_query_directory()
4808 trace_smb3_query_dir_err(xid, persistent_fid, tcon->tid, in SMB2_query_directory()
4809 tcon->ses->Suid, index, 0, rc); in SMB2_query_directory()
4814 trace_smb3_query_dir_done(xid, persistent_fid, tcon->tid, in SMB2_query_directory()
4815 tcon->ses->Suid, index, srch_inf->entries_in_buffer); in SMB2_query_directory()
4824 SMB2_set_info_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_set_info_init() argument
4835 rc = smb2_plain_req_init(SMB2_SET_INFO, tcon, server, in SMB2_set_info_init()
4875 send_set_info(const unsigned int xid, struct cifs_tcon *tcon, in send_set_info() argument
4886 struct cifs_ses *ses = tcon->ses; in send_set_info()
4896 if (smb3_encryption_required(tcon)) in send_set_info()
4907 rc = SMB2_set_info_init(tcon, server, in send_set_info()
4924 cifs_stats_fail_inc(tcon, SMB2_SET_INFO_HE); in send_set_info()
4925 trace_smb3_set_info_err(xid, persistent_fid, tcon->tid, in send_set_info()
4935 SMB2_set_eof(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid, in SMB2_set_eof() argument
4947 return send_set_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_set_eof()
4953 SMB2_set_acl(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_set_acl() argument
4957 return send_set_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_set_acl()
4963 SMB2_set_ea(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_set_ea() argument
4967 return send_set_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_set_ea()
4973 SMB2_oplock_break(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_oplock_break() argument
4980 struct cifs_ses *ses = tcon->ses; in SMB2_oplock_break()
4989 rc = smb2_plain_req_init(SMB2_OPLOCK_BREAK, tcon, server, in SMB2_oplock_break()
4994 if (smb3_encryption_required(tcon)) in SMB2_oplock_break()
5016 cifs_stats_fail_inc(tcon, SMB2_OPLOCK_BREAK_HE); in SMB2_oplock_break()
5055 build_qfs_info_req(struct kvec *iov, struct cifs_tcon *tcon, in build_qfs_info_req() argument
5066 if ((tcon->ses == NULL) || server == NULL) in build_qfs_info_req()
5069 rc = smb2_plain_req_init(SMB2_QUERY_INFO, tcon, server, in build_qfs_info_req()
5090 SMB311_posix_qfs_info(const unsigned int xid, struct cifs_tcon *tcon, in SMB311_posix_qfs_info() argument
5099 struct cifs_ses *ses = tcon->ses; in SMB311_posix_qfs_info()
5104 rc = build_qfs_info_req(&iov, tcon, server, in SMB311_posix_qfs_info()
5111 if (smb3_encryption_required(tcon)) in SMB311_posix_qfs_info()
5122 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE); in SMB311_posix_qfs_info()
5141 SMB2_QFS_info(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_QFS_info() argument
5150 struct cifs_ses *ses = tcon->ses; in SMB2_QFS_info()
5155 rc = build_qfs_info_req(&iov, tcon, server, in SMB2_QFS_info()
5162 if (smb3_encryption_required(tcon)) in SMB2_QFS_info()
5173 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE); in SMB2_QFS_info()
5192 SMB2_QFS_attr(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_QFS_attr() argument
5201 struct cifs_ses *ses = tcon->ses; in SMB2_QFS_attr()
5223 rc = build_qfs_info_req(&iov, tcon, server, in SMB2_QFS_attr()
5229 if (smb3_encryption_required(tcon)) in SMB2_QFS_attr()
5240 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE); in SMB2_QFS_attr()
5252 memcpy(&tcon->fsAttrInfo, offset in SMB2_QFS_attr()
5256 memcpy(&tcon->fsDevInfo, offset in SMB2_QFS_attr()
5261 tcon->ss_flags = le32_to_cpu(ss_info->Flags); in SMB2_QFS_attr()
5262 tcon->perf_sector_size = in SMB2_QFS_attr()
5267 tcon->vol_serial_number = vol_info->VolumeSerialNumber; in SMB2_QFS_attr()
5268 tcon->vol_create_time = vol_info->VolumeCreationTime; in SMB2_QFS_attr()
5277 smb2_lockv(const unsigned int xid, struct cifs_tcon *tcon, in smb2_lockv() argument
5290 struct TCP_Server_Info *server = cifs_pick_channel(tcon->ses); in smb2_lockv()
5294 rc = smb2_plain_req_init(SMB2_LOCK, tcon, server, in smb2_lockv()
5299 if (smb3_encryption_required(tcon)) in smb2_lockv()
5315 cifs_stats_inc(&tcon->stats.cifs_stats.num_locks); in smb2_lockv()
5321 rc = cifs_send_recv(xid, tcon->ses, server, in smb2_lockv()
5327 cifs_stats_fail_inc(tcon, SMB2_LOCK_HE); in smb2_lockv()
5328 trace_smb3_lock_err(xid, persist_fid, tcon->tid, in smb2_lockv()
5329 tcon->ses->Suid, rc); in smb2_lockv()
5336 SMB2_lock(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_lock() argument
5349 return smb2_lockv(xid, tcon, persist_fid, volatile_fid, pid, 1, &lock); in SMB2_lock()
5353 SMB2_lease_break(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_lease_break() argument
5359 struct cifs_ses *ses = tcon->ses; in SMB2_lease_break()
5367 struct TCP_Server_Info *server = cifs_pick_channel(tcon->ses); in SMB2_lease_break()
5370 rc = smb2_plain_req_init(SMB2_OPLOCK_BREAK, tcon, server, in SMB2_lease_break()
5375 if (smb3_encryption_required(tcon)) in SMB2_lease_break()
5401 cifs_stats_fail_inc(tcon, SMB2_OPLOCK_BREAK_HE); in SMB2_lease_break()
5402 trace_smb3_lease_err(le32_to_cpu(lease_state), tcon->tid, in SMB2_lease_break()
5406 trace_smb3_lease_done(le32_to_cpu(lease_state), tcon->tid, in SMB2_lease_break()