/fs/cifs/ |
D | smb1ops.c | 443 cifs_negotiate_wsize(struct cifs_tcon *tcon, struct smb_vol *volume_info) in cifs_negotiate_wsize() argument 445 __u64 unix_cap = le64_to_cpu(tcon->fsUnixInfo.Capability); in cifs_negotiate_wsize() 446 struct TCP_Server_Info *server = tcon->ses->server; in cifs_negotiate_wsize() 452 else if (tcon->unix_ext && (unix_cap & CIFS_UNIX_LARGE_WRITE_CAP)) in cifs_negotiate_wsize() 458 if (!tcon->unix_ext || !(unix_cap & CIFS_UNIX_LARGE_WRITE_CAP)) in cifs_negotiate_wsize() 478 cifs_negotiate_rsize(struct cifs_tcon *tcon, struct smb_vol *volume_info) in cifs_negotiate_rsize() argument 480 __u64 unix_cap = le64_to_cpu(tcon->fsUnixInfo.Capability); in cifs_negotiate_rsize() 481 struct TCP_Server_Info *server = tcon->ses->server; in cifs_negotiate_rsize() 496 if (tcon->unix_ext && (unix_cap & CIFS_UNIX_LARGE_READ_CAP)) in cifs_negotiate_rsize() 519 cifs_qfs_tcon(const unsigned int xid, struct cifs_tcon *tcon) in cifs_qfs_tcon() argument [all …]
|
D | ioctl.c | 86 static long smb_mnt_get_fsinfo(unsigned int xid, struct cifs_tcon *tcon, in smb_mnt_get_fsinfo() argument 97 fsinf->protocol_id = tcon->ses->server->vals->protocol_id; in smb_mnt_get_fsinfo() 99 le32_to_cpu(tcon->fsDevInfo.DeviceCharacteristics); in smb_mnt_get_fsinfo() 100 fsinf->device_type = le32_to_cpu(tcon->fsDevInfo.DeviceType); in smb_mnt_get_fsinfo() 101 fsinf->fs_attributes = le32_to_cpu(tcon->fsAttrInfo.Attributes); in smb_mnt_get_fsinfo() 103 le32_to_cpu(tcon->fsAttrInfo.MaxPathNameComponentLength); in smb_mnt_get_fsinfo() 104 fsinf->vol_serial_number = tcon->vol_serial_number; in smb_mnt_get_fsinfo() 105 fsinf->vol_create_time = le64_to_cpu(tcon->vol_create_time); in smb_mnt_get_fsinfo() 106 fsinf->share_flags = tcon->share_flags; in smb_mnt_get_fsinfo() 107 fsinf->share_caps = le32_to_cpu(tcon->capabilities); in smb_mnt_get_fsinfo() [all …]
|
D | smb2pdu.c | 81 static int encryption_required(const struct cifs_tcon *tcon) in encryption_required() argument 83 if (!tcon) in encryption_required() 85 if ((tcon->ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA) || in encryption_required() 86 (tcon->share_flags & SHI1005_FLAGS_ENCRYPT_DATA)) in encryption_required() 88 if (tcon->seal && in encryption_required() 89 (tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION)) in encryption_required() 96 const struct cifs_tcon *tcon) in smb2_hdr_assemble() argument 101 if (tcon && tcon->ses && tcon->ses->server) { in smb2_hdr_assemble() 102 struct TCP_Server_Info *server = tcon->ses->server; in smb2_hdr_assemble() 118 if (!tcon) in smb2_hdr_assemble() [all …]
|
D | smb2proto.h | 70 extern int smb2_query_path_info(const unsigned int xid, struct cifs_tcon *tcon, 74 extern int smb2_set_path_size(const unsigned int xid, struct cifs_tcon *tcon, 79 extern int smb2_mkdir(const unsigned int xid, struct cifs_tcon *tcon, 83 struct cifs_tcon *tcon, const unsigned int xid); 84 extern int smb2_rmdir(const unsigned int xid, struct cifs_tcon *tcon, 86 extern int smb2_unlink(const unsigned int xid, struct cifs_tcon *tcon, 88 extern int smb2_rename_path(const unsigned int xid, struct cifs_tcon *tcon, 91 extern int smb2_create_hardlink(const unsigned int xid, struct cifs_tcon *tcon, 94 extern int smb3_create_mf_symlink(unsigned int xid, struct cifs_tcon *tcon, 97 extern int smb3_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon, [all …]
|
D | cifsproto.h | 68 struct cifs_tcon *tcon, 207 extern void cifs_mark_open_files_invalid(struct cifs_tcon *tcon); 208 extern void cifs_reopen_persistent_handles(struct cifs_tcon *tcon); 223 extern void cifs_put_tcon(struct cifs_tcon *tcon); 246 const char *tree, struct cifs_tcon *tcon, 249 extern int CIFSFindFirst(const unsigned int xid, struct cifs_tcon *tcon, 255 extern int CIFSFindNext(const unsigned int xid, struct cifs_tcon *tcon, 259 extern int CIFSFindClose(const unsigned int xid, struct cifs_tcon *tcon, 262 extern int CIFSSMBQFileInfo(const unsigned int xid, struct cifs_tcon *tcon, 264 extern int CIFSSMBQPathInfo(const unsigned int xid, struct cifs_tcon *tcon, [all …]
|
D | smb2inode.c | 41 smb2_open_op_close(const unsigned int xid, struct cifs_tcon *tcon, in smb2_open_op_close() argument 56 oparms.tcon = tcon; in smb2_open_op_close() 73 tmprc = SMB2_query_info(xid, tcon, fid.persistent_fid, in smb2_open_op_close() 84 tmprc = SMB2_rmdir(xid, tcon, fid.persistent_fid, in smb2_open_op_close() 88 tmprc = SMB2_rename(xid, tcon, fid.persistent_fid, in smb2_open_op_close() 92 tmprc = SMB2_set_hardlink(xid, tcon, fid.persistent_fid, in smb2_open_op_close() 96 tmprc = SMB2_set_eof(xid, tcon, fid.persistent_fid, in smb2_open_op_close() 101 tmprc = SMB2_set_info(xid, tcon, fid.persistent_fid, in smb2_open_op_close() 110 rc = SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid); in smb2_open_op_close() 128 smb2_query_path_info(const unsigned int xid, struct cifs_tcon *tcon, in smb2_query_path_info() argument [all …]
|
D | link.c | 182 create_mf_symlink(const unsigned int xid, struct cifs_tcon *tcon, in create_mf_symlink() argument 198 if (tcon->ses->server->ops->create_mf_symlink) in create_mf_symlink() 199 rc = tcon->ses->server->ops->create_mf_symlink(xid, tcon, in create_mf_symlink() 215 query_mf_symlink(const unsigned int xid, struct cifs_tcon *tcon, in query_mf_symlink() argument 228 if (tcon->ses->server->ops->query_mf_symlink) in query_mf_symlink() 229 rc = tcon->ses->server->ops->query_mf_symlink(xid, tcon, in query_mf_symlink() 249 check_mf_symlink(unsigned int xid, struct cifs_tcon *tcon, in check_mf_symlink() argument 266 if (tcon->ses->server->ops->query_mf_symlink) in check_mf_symlink() 267 rc = tcon->ses->server->ops->query_mf_symlink(xid, tcon, in check_mf_symlink() 303 cifs_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon, in cifs_query_mf_symlink() argument [all …]
|
D | dir.c | 50 struct cifs_tcon *tcon, int add_treename) in cifs_build_path_to_root() argument 63 dfsplen = strnlen(tcon->treeName, MAX_TREE_SIZE + 1); in cifs_build_path_to_root() 72 strncpy(full_path, tcon->treeName, dfsplen); in cifs_build_path_to_root() 85 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb); in build_path_from_dentry() local 86 bool prefix = tcon->Flags & SMB_SHARE_IS_IN_DFS; in build_path_from_dentry() 102 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb); in build_path_from_dentry_optional_prefix() local 107 dfsplen = strnlen(tcon->treeName, MAX_TREE_SIZE + 1); in build_path_from_dentry_optional_prefix() 184 strncpy(full_path, tcon->treeName, dfsplen); in build_path_from_dentry_optional_prefix() 202 check_name(struct dentry *direntry, struct cifs_tcon *tcon) in check_name() argument 207 if (unlikely(tcon->fsAttrInfo.MaxPathNameComponentLength && in check_name() [all …]
|
D | inode.c | 345 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); local 348 rc = CIFSSMBUnixQFileInfo(xid, tcon, cfile->fid.netfid, &find_data); 368 struct cifs_tcon *tcon; local 377 tcon = tlink_tcon(tlink); 380 rc = CIFSSMBUnixQPathInfo(xid, tcon, full_path, &find_data, 395 int tmprc = check_mf_symlink(xid, tcon, cifs_sb, &fattr, 440 struct cifs_tcon *tcon; local 466 tcon = tlink_tcon(tlink); 468 oparms.tcon = tcon; 479 if (tcon->ses->server->oplocks) [all …]
|
D | smb2ops.c | 264 smb2_negotiate_wsize(struct cifs_tcon *tcon, struct smb_vol *volume_info) in smb2_negotiate_wsize() argument 266 struct TCP_Server_Info *server = tcon->ses->server; in smb2_negotiate_wsize() 280 smb2_negotiate_rsize(struct cifs_tcon *tcon, struct smb_vol *volume_info) in smb2_negotiate_rsize() argument 282 struct TCP_Server_Info *server = tcon->ses->server; in smb2_negotiate_rsize() 297 SMB3_request_interfaces(const unsigned int xid, struct cifs_tcon *tcon) in SMB3_request_interfaces() argument 303 rc = SMB2_ioctl(xid, tcon, NO_FILE_ID, NO_FILE_ID, in SMB3_request_interfaces() 326 smb3_qfs_tcon(const unsigned int xid, struct cifs_tcon *tcon) in smb3_qfs_tcon() argument 334 oparms.tcon = tcon; in smb3_qfs_tcon() 346 SMB3_request_interfaces(xid, tcon); in smb3_qfs_tcon() 349 SMB2_QFS_attr(xid, tcon, fid.persistent_fid, fid.volatile_fid, in smb3_qfs_tcon() [all …]
|
D | cifssmb.c | 94 cifs_mark_open_files_invalid(struct cifs_tcon *tcon) in cifs_mark_open_files_invalid() argument 101 spin_lock(&tcon->open_file_lock); in cifs_mark_open_files_invalid() 102 list_for_each_safe(tmp, tmp1, &tcon->openFileList) { in cifs_mark_open_files_invalid() 107 spin_unlock(&tcon->open_file_lock); in cifs_mark_open_files_invalid() 116 cifs_reconnect_tcon(struct cifs_tcon *tcon, int smb_command) in cifs_reconnect_tcon() argument 128 if (!tcon) in cifs_reconnect_tcon() 131 ses = tcon->ses; in cifs_reconnect_tcon() 138 if (tcon->tidStatus == CifsExiting) { in cifs_reconnect_tcon() 171 if (!tcon->retry) { in cifs_reconnect_tcon() 177 if (!ses->need_reconnect && !tcon->need_reconnect) in cifs_reconnect_tcon() [all …]
|
D | file.c | 123 struct cifs_tcon *tcon; in cifs_posix_open() local 137 tcon = tlink_tcon(tlink); in cifs_posix_open() 141 rc = CIFSPOSIXCreate(xid, tcon, posix_flags, mode, pnetfid, presp_data, in cifs_posix_open() 176 struct cifs_tcon *tcon, unsigned int f_flags, __u32 *oplock, in cifs_nt_open() argument 184 struct TCP_Server_Info *server = tcon->ses->server; in cifs_nt_open() 234 oparms.tcon = tcon; in cifs_nt_open() 248 if (tcon->unix_ext) in cifs_nt_open() 256 server->ops->close(xid, tcon, fid); in cifs_nt_open() 299 struct cifs_tcon *tcon = tlink_tcon(tlink); in cifs_new_fileinfo() local 300 struct TCP_Server_Info *server = tcon->ses->server; in cifs_new_fileinfo() [all …]
|
D | cifs_debug.c | 116 struct cifs_tcon *tcon; in cifs_debug_data_proc_show() local 209 tcon = list_entry(tmp3, struct cifs_tcon, in cifs_debug_data_proc_show() 212 dev_type = le32_to_cpu(tcon->fsDevInfo.DeviceType); in cifs_debug_data_proc_show() 214 tcon->treeName, tcon->tc_count); in cifs_debug_data_proc_show() 215 if (tcon->nativeFileSystem) { in cifs_debug_data_proc_show() 217 tcon->nativeFileSystem); in cifs_debug_data_proc_show() 221 le32_to_cpu(tcon->fsDevInfo.DeviceCharacteristics), in cifs_debug_data_proc_show() 222 le32_to_cpu(tcon->fsAttrInfo.Attributes), in cifs_debug_data_proc_show() 223 le32_to_cpu(tcon->fsAttrInfo.MaxPathNameComponentLength), in cifs_debug_data_proc_show() 224 tcon->tidStatus); in cifs_debug_data_proc_show() [all …]
|
D | smb2misc.c | 475 smb2_tcon_has_lease(struct cifs_tcon *tcon, struct smb2_lease_break *rsp, in smb2_tcon_has_lease() argument 489 list_for_each(tmp, &tcon->openFileList) { in smb2_tcon_has_lease() 526 list_for_each_entry(open, &tcon->pending_opens, olist) { in smb2_tcon_has_lease() 555 struct cifs_tcon *tcon; in smb2_is_valid_lease_break() local 576 tcon = list_entry(tmp2, struct cifs_tcon, in smb2_is_valid_lease_break() 578 spin_lock(&tcon->open_file_lock); in smb2_is_valid_lease_break() 580 &tcon->stats.cifs_stats.num_oplock_brks); in smb2_is_valid_lease_break() 581 if (smb2_tcon_has_lease(tcon, rsp, lw)) { in smb2_is_valid_lease_break() 582 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_lease_break() 586 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_lease_break() [all …]
|
D | cifsfs.c | 121 struct cifs_tcon *tcon; in cifs_read_super() local 125 tcon = cifs_sb_master_tcon(cifs_sb); in cifs_read_super() 130 if (tcon->ses->capabilities & tcon->ses->server->vals->cap_large_files) in cifs_read_super() 156 if (tcon->nocase) in cifs_read_super() 193 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb); in cifs_statfs() local 194 struct TCP_Server_Info *server = tcon->ses->server; in cifs_statfs() 200 if (le32_to_cpu(tcon->fsAttrInfo.MaxPathNameComponentLength) > 0) in cifs_statfs() 202 le32_to_cpu(tcon->fsAttrInfo.MaxPathNameComponentLength); in cifs_statfs() 206 buf->f_fsid.val[0] = tcon->vol_serial_number; in cifs_statfs() 208 buf->f_fsid.val[1] = (int)le64_to_cpu(tcon->vol_create_time); in cifs_statfs() [all …]
|
D | connect.c | 378 struct cifs_tcon *tcon; in cifs_reconnect() local 406 tcon = list_entry(tmp2, struct cifs_tcon, tcon_list); in cifs_reconnect() 407 tcon->need_reconnect = true; in cifs_reconnect() 2793 static int match_tcon(struct cifs_tcon *tcon, struct smb_vol *volume_info) in match_tcon() argument 2795 if (tcon->tidStatus == CifsExiting) in match_tcon() 2797 if (strncmp(tcon->treeName, volume_info->UNC, MAX_TREE_SIZE)) in match_tcon() 2799 if (tcon->seal != volume_info->seal) in match_tcon() 2801 if (tcon->snapshot_time != volume_info->snapshot_time) in match_tcon() 2810 struct cifs_tcon *tcon; in cifs_find_tcon() local 2814 tcon = list_entry(tmp, struct cifs_tcon, tcon_list); in cifs_find_tcon() [all …]
|
D | fscache.c | 43 void cifs_fscache_get_super_cookie(struct cifs_tcon *tcon) in cifs_fscache_get_super_cookie() argument 45 struct TCP_Server_Info *server = tcon->ses->server; in cifs_fscache_get_super_cookie() 47 tcon->fscache = in cifs_fscache_get_super_cookie() 49 &cifs_fscache_super_index_def, tcon, true); in cifs_fscache_get_super_cookie() 51 __func__, server->fscache, tcon->fscache); in cifs_fscache_get_super_cookie() 54 void cifs_fscache_release_super_cookie(struct cifs_tcon *tcon) in cifs_fscache_release_super_cookie() argument 56 cifs_dbg(FYI, "%s: (0x%p)\n", __func__, tcon->fscache); in cifs_fscache_release_super_cookie() 57 fscache_relinquish_cookie(tcon->fscache, 0); in cifs_fscache_release_super_cookie() 58 tcon->fscache = NULL; in cifs_fscache_release_super_cookie() 65 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb); in cifs_fscache_enable_inode_cookie() local [all …]
|
D | smb2file.c | 64 if (oparms->tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_LEASING) in smb2_open_file() 72 if (oparms->tcon->use_resilient) { in smb2_open_file() 75 rc = SMB2_ioctl(xid, oparms->tcon, fid->persistent_fid, in smb2_open_file() 83 oparms->tcon->use_resilient = false; in smb2_open_file() 92 rc = SMB2_get_srv_num(xid, oparms->tcon, fid->persistent_fid, in smb2_open_file() 117 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in smb2_unlock_range() local 129 max_buf = tcon->ses->server->maxBuf; in smb2_unlock_range() 169 stored_rc = smb2_lockv(xid, tcon, in smb2_unlock_range() 194 stored_rc = smb2_lockv(xid, tcon, cfile->fid.persistent_fid, in smb2_unlock_range() 218 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in smb2_push_mand_fdlocks() local [all …]
|
D | readdir.c | 275 struct cifs_tcon *tcon; in initiate_cifs_search() local 291 tcon = tlink_tcon(tlink); in initiate_cifs_search() 294 tcon = tlink_tcon(cifsFile->tlink); in initiate_cifs_search() 297 server = tcon->ses->server; in initiate_cifs_search() 319 if (tcon->unix_ext) in initiate_cifs_search() 321 else if ((tcon->ses->capabilities & in initiate_cifs_search() 322 tcon->ses->server->vals->cap_nt_find) == 0) { in initiate_cifs_search() 334 rc = server->ops->query_dir_first(xid, tcon, full_path, cifs_sb, in initiate_cifs_search() 572 find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos, in find_cifs_entry() argument 582 struct TCP_Server_Info *server = tcon->ses->server; in find_cifs_entry() [all …]
|
D | cache.c | 149 const struct cifs_tcon *tcon = cookie_netfs_data; in cifs_super_get_key() local 153 sharename = extract_sharename(tcon->treeName); in cifs_super_get_key() 176 const struct cifs_tcon *tcon = cookie_netfs_data; in cifs_fscache_super_get_aux() local 179 auxdata.resource_id = tcon->resource_id; in cifs_fscache_super_get_aux() 195 const struct cifs_tcon *tcon = cookie_netfs_data; in cifs_fscache_super_check_aux() local 201 auxdata.resource_id = tcon->resource_id; in cifs_fscache_super_check_aux()
|
D | cifsglob.h | 396 int (*set_integrity)(const unsigned int, struct cifs_tcon *tcon, 398 int (*enum_snapshots)(const unsigned int xid, struct cifs_tcon *tcon, 1051 struct cifs_tcon *tcon; member 1109 struct cifs_tcon *tcon; member 1288 static inline void cifs_stats_bytes_written(struct cifs_tcon *tcon, in cifs_stats_bytes_written() argument 1292 spin_lock(&tcon->stat_lock); in cifs_stats_bytes_written() 1293 tcon->bytes_written += bytes; in cifs_stats_bytes_written() 1294 spin_unlock(&tcon->stat_lock); in cifs_stats_bytes_written() 1298 static inline void cifs_stats_bytes_read(struct cifs_tcon *tcon, in cifs_stats_bytes_read() argument 1301 spin_lock(&tcon->stat_lock); in cifs_stats_bytes_read() [all …]
|
D | smb2transport.c | 132 struct cifs_tcon *tcon; in smb2_find_smb_sess_tcon_unlocked() local 134 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) { in smb2_find_smb_sess_tcon_unlocked() 135 if (tcon->tid != tid) in smb2_find_smb_sess_tcon_unlocked() 137 ++tcon->tc_count; in smb2_find_smb_sess_tcon_unlocked() 138 return tcon; in smb2_find_smb_sess_tcon_unlocked() 153 struct cifs_tcon *tcon; in smb2_find_smb_tcon() local 161 tcon = smb2_find_smb_sess_tcon_unlocked(ses, tid); in smb2_find_smb_tcon() 164 return tcon; in smb2_find_smb_tcon()
|
D | misc.c | 390 struct cifs_tcon *tcon; in is_valid_oplock_break() local 458 tcon = list_entry(tmp1, struct cifs_tcon, tcon_list); in is_valid_oplock_break() 459 if (tcon->tid != buf->Tid) in is_valid_oplock_break() 462 cifs_stats_inc(&tcon->stats.cifs_stats.num_oplock_brks); in is_valid_oplock_break() 463 spin_lock(&tcon->open_file_lock); in is_valid_oplock_break() 464 list_for_each(tmp2, &tcon->openFileList) { in is_valid_oplock_break() 492 spin_unlock(&tcon->open_file_lock); in is_valid_oplock_break() 496 spin_unlock(&tcon->open_file_lock); in is_valid_oplock_break()
|
D | cifsacl.c | 1020 struct cifs_tcon *tcon; in get_cifs_acl_by_path() local 1028 tcon = tlink_tcon(tlink); in get_cifs_acl_by_path() 1034 oparms.tcon = tcon; in get_cifs_acl_by_path() 1045 rc = CIFSSMBGetCIFSACL(xid, tcon, fid.netfid, &pntsd, pacllen); in get_cifs_acl_by_path() 1046 CIFSSMBClose(xid, tcon, fid.netfid); in get_cifs_acl_by_path() 1083 struct cifs_tcon *tcon; in set_cifs_acl() local 1092 tcon = tlink_tcon(tlink); in set_cifs_acl() 1103 oparms.tcon = tcon; in set_cifs_acl() 1118 rc = CIFSSMBSetCIFSACL(xid, tcon, fid.netfid, pnntsd, acllen, aclflag); in set_cifs_acl() 1121 CIFSSMBClose(xid, tcon, fid.netfid); in set_cifs_acl()
|
D | fscache.h | 110 static inline void cifs_fscache_get_super_cookie(struct cifs_tcon *tcon) {} in cifs_fscache_get_super_cookie() argument 112 cifs_fscache_release_super_cookie(struct cifs_tcon *tcon) {} in cifs_fscache_release_super_cookie() argument
|