Lines Matching +full:tcon +full:- +full:channel
58 * max attribute cache timeout (jiffies) - 2^30
142 struct crypto_shash *hmacmd5; /* hmac-md5 hash function */
144 struct crypto_shash *hmacsha256; /* hmac-sha256 hash function */
145 struct crypto_shash *cmacaes; /* block-cipher based MAC function */
243 * message field DataRemaining for out-of-band data read (e.g through
302 int (*query_reparse_tag)(const unsigned int xid, struct cifs_tcon *tcon,
326 umode_t mode, struct cifs_tcon *tcon,
330 struct cifs_tcon *tcon, const char *name,
356 /* open a file for non-posix mounts */
359 /* set fid protocol-specific info */
365 void (*close_getattr)(const unsigned int xid, struct cifs_tcon *tcon,
423 int (*set_integrity)(const unsigned int, struct cifs_tcon *tcon,
425 int (*enum_snapshots)(const unsigned int xid, struct cifs_tcon *tcon,
477 /* init transform request - used for encryption for now */
488 struct cifs_tcon *tcon,
496 struct cifs_tcon *tcon,
501 int (*fiemap)(struct cifs_tcon *tcon, struct cifsFileInfo *,
530 #define HEADER_SIZE(server) (server->vals->header_size)
531 #define MAX_HEADER_SIZE(server) (server->vals->max_header_size)
712 /* message size the server can send or receive for non-raw SMBs */
720 __u64 CurrentMid; /* multiplex id - rotating counter */
779 bool noblockcnt; /* use non-blocking connect() */
780 bool is_channel; /* if a session channel */
792 spin_lock(&server->req_lock); in in_flight()
793 num = server->in_flight; in in_flight()
794 spin_unlock(&server->req_lock); in in_flight()
802 spin_lock(&server->req_lock); in has_credits()
804 spin_unlock(&server->req_lock); in has_credits()
812 server->ops->add_credits(server, credits, optype); in add_credits()
819 if (credits->value) { in add_credits_and_wake_if()
820 server->ops->add_credits(server, credits, optype); in add_credits_and_wake_if()
821 wake_up(&server->request_q); in add_credits_and_wake_if()
828 server->ops->set_credits(server, val); in set_credits()
835 return server->ops->adjust_credits ? in adjust_credits()
836 server->ops->adjust_credits(server, credits, payload_size) : 0; in adjust_credits()
842 return cpu_to_le64(server->ops->get_next_mid(server)); in get_next_mid64()
848 __u16 mid = server->ops->get_next_mid(server); in get_next_mid()
851 * on-the-wire decoding. in get_next_mid()
859 if (server->ops->revert_current_mid) in revert_current_mid()
860 server->ops->revert_current_mid(server, val); in revert_current_mid()
867 unsigned int num = le16_to_cpu(shdr->CreditCharge); in revert_current_mid_from_hdr()
875 return le16_to_cpu(smb->Mid); in get_mid()
881 return mid == le16_to_cpu(smb->Mid); in compare_mid()
886 * we can allow up to 2^24-1, minus the size of a READ/WRITE_AND_X header, not
897 #define CIFS_MAX_WSIZE ((1<<24) - 1 - sizeof(WRITE_REQ) + 4)
898 #define CIFS_MAX_RSIZE ((1<<24) - sizeof(READ_RSP) + 4)
902 * of 2^17-1 minus the size of the call header. That allows for a read or
905 #define CIFS_MAX_RFC1002_WSIZE ((1<<17) - 1 - sizeof(WRITE_REQ) + 4)
906 #define CIFS_MAX_RFC1002_RSIZE ((1<<17) - 1 - sizeof(READ_RSP) + 4)
925 …s.msdn.com/b/openspecification/archive/2009/04/10/smb-maximum-transmit-buffer-size-and-performance…
931 * Macros to allow the TCP_Server_Info->net field and related code to drop out
939 return srv->net; in cifs_net_ns()
944 srv->net = net; in cifs_set_net_ns()
983 unsigned overrideSecFlg; /* if non-zero override global sec flags */
1034 * When binding a new channel, we need to access the channel which isn't fully
1041 if (ses->binding) in cifs_ses_binding_channel()
1042 return ses->binding_chan; in cifs_ses_binding_channel()
1049 * channel this returns the last channel which isn't fully established
1058 if (ses->binding) in cifs_ses_server()
1059 return ses->binding_chan->server; in cifs_ses_server()
1061 return ses->server; in cifs_ses_server()
1067 return ses->server->vals->cap_unix & ses->capabilities; in cap_unix()
1077 struct cifs_tcon *tcon; member
1097 char *password; /* for share-level security */
1152 bool need_reopen_files:1; /* need to reopen tcon file handles */
1161 __u64 snapshot_time; /* for timewarp tokens - timestamp of snapshot */
1183 * This is a refcounted and timestamped container for a tcon pointer. The
1184 * container holds a tcon reference. It is considered safe to free one of
1206 return tlink->tl_tcon; in tlink_tcon()
1212 return cifs_sb->master_tlink; in cifs_sb_master_tlink()
1221 atomic_inc(&tlink->tl_count); in cifs_get_tlink()
1271 #define ACL_NO_MODE ((umode_t)(-1))
1273 struct cifs_tcon *tcon; member
1306 /* following two lists are protected by tcon->open_file_lock */
1307 struct list_head tlist; /* pointer to next fid owned by tcon */
1309 /* lock list below protected by cifsi->lock_sem */
1340 struct cifs_tcon *tcon; member
1430 * cfile->file_info_lock held.
1435 ++cifs_file->count; in cifsFileInfo_get_locked()
1450 #define CIFS_CACHE_READ(cinode) ((cinode->oplock & CIFS_CACHE_READ_FLG) || (CIFS_SB(cinode->vfs_ino…
1451 #define CIFS_CACHE_HANDLE(cinode) (cinode->oplock & CIFS_CACHE_HANDLE_FLG)
1452 #define CIFS_CACHE_WRITE(cinode) ((cinode->oplock & CIFS_CACHE_WRITE_FLG) || (CIFS_SB(cinode->vfs_i…
1483 u64 server_eof; /* current file size on server -- protected by i_lock */
1502 return sb->s_fs_info; in CIFS_SB()
1508 return CIFS_SB(file_inode(file)->i_sb); in CIFS_FILE_SB()
1513 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) in CIFS_DIR_SEP()
1536 static inline void cifs_stats_bytes_written(struct cifs_tcon *tcon, in cifs_stats_bytes_written() argument
1540 spin_lock(&tcon->stat_lock); in cifs_stats_bytes_written()
1541 tcon->bytes_written += bytes; in cifs_stats_bytes_written()
1542 spin_unlock(&tcon->stat_lock); in cifs_stats_bytes_written()
1546 static inline void cifs_stats_bytes_read(struct cifs_tcon *tcon, in cifs_stats_bytes_read() argument
1549 spin_lock(&tcon->stat_lock); in cifs_stats_bytes_read()
1550 tcon->bytes_read += bytes; in cifs_stats_bytes_read()
1551 spin_unlock(&tcon->stat_lock); in cifs_stats_bytes_read()
1560 * - This will be called by cifsd, with no locks held.
1561 * - The mid will still be on the pending_mid_q.
1562 * - mid->resp_buf will point to the current buffer.
1575 * - it will be called by cifsd, with no locks held
1576 * - the mid will be removed from any lists
1621 struct cifs_tcon *tcon; member
1631 atomic_inc(&server->in_send); in cifs_in_send_inc()
1636 atomic_dec(&server->in_send); in cifs_in_send_dec()
1641 atomic_inc(&server->num_waiters); in cifs_num_waiters_inc()
1646 atomic_dec(&server->num_waiters); in cifs_num_waiters_dec()
1652 mid->when_sent = jiffies; in cifs_save_when_sent()
1718 kfree(param->path_name); in free_dfs_info_param()
1719 kfree(param->node_name); in free_dfs_info_param()
1739 case -EINTR: in is_interrupt_error()
1740 case -ERESTARTSYS: in is_interrupt_error()
1741 case -ERESTARTNOHAND: in is_interrupt_error()
1742 case -ERESTARTNOINTR: in is_interrupt_error()
1750 if (is_interrupt_error(error) || error == -EAGAIN) in is_retryable_error()
1783 #define CIFS_LOG_ERROR 0x010 /* log NT STATUS if non-zero */
1860 * ---------
1867 * tcon->open_file_lock protects the list of open files hanging off the tcon
1868 * inode->open_file_lock protects the openFileList hanging off the inode
1869 * cfile->file_info_lock protects counters and fields in cifs file struct
1871 * mapping->page_lock protects certain per page operations
1877 * ----------
1901 * tcp session, and the list of tcon's per smb session. It also protects
1902 * the reference counters for the server, smb session, and tcon. It also
1904 * changes to the tcon->tidStatus should be done while holding this lock.
1906 * tcon->open_file_lock and that before file->file_info_lock since the
1907 * structure order is cifs_socket-->cifs_ses-->cifs_tcon-->cifs_file
1951 extern bool enable_gcm_256; /* allow optional negotiate of strongest signing (aes-gcm-256) */
1952 extern bool require_gcm_256; /* require use of strongest signing (aes-gcm-256) */
2027 return strcmp(server->vals->version_string, SMB1_VERSION_STRING) == 0; in is_smb1_server()
2030 static inline bool is_tcon_dfs(struct cifs_tcon *tcon) in is_tcon_dfs() argument
2033 * For SMB1, see MS-CIFS 2.4.55 SMB_COM_TREE_CONNECT_ANDX (0x75) and MS-CIFS 3.3.4.4 DFS in is_tcon_dfs()
2036 * For SMB2+, see MS-SMB2 2.2.10 SMB2 TREE_CONNECT Response and MS-SMB2 3.3.4.14 Server in is_tcon_dfs()
2039 if (!tcon || !tcon->ses || !tcon->ses->server) in is_tcon_dfs()
2041 return is_smb1_server(tcon->ses->server) ? tcon->Flags & SMB_SHARE_IS_IN_DFS : in is_tcon_dfs()
2042 tcon->share_flags & (SHI1005_FLAGS_DFS | SHI1005_FLAGS_DFS_ROOT); in is_tcon_dfs()