fs/smb/server/connection.h
Source file repositories/reference/linux-study-clean/fs/smb/server/connection.h
File Facts
- System
- Linux kernel
- Corpus path
fs/smb/server/connection.h- Extension
.h- Size
- 7443 bytes
- Lines
- 270
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/list.hlinux/inet.hlinux/ip.hnet/sock.hnet/tcp.hnet/inet_connection_sock.hnet/request_sock.hlinux/kthread.hlinux/nls.hlinux/unicode.hlinux/workqueue.hsmb_common.hksmbd_work.h
Detected Declarations
struct smbdirect_buffer_descriptor_v1struct ksmbd_conn_statsstruct ksmbd_transportstruct ksmbd_connstruct ksmbd_conn_opsstruct ksmbd_transport_opsstruct ksmbd_transportfunction ksmbd_conn_goodfunction ksmbd_conn_need_negotiatefunction ksmbd_conn_need_setupfunction ksmbd_conn_need_reconnectfunction ksmbd_conn_exitingfunction ksmbd_conn_releasingfunction ksmbd_conn_set_newfunction ksmbd_conn_set_goodfunction ksmbd_conn_set_need_negotiatefunction ksmbd_conn_set_need_setupfunction ksmbd_conn_set_need_reconnectfunction ksmbd_conn_set_exitingfunction ksmbd_conn_set_releasing
Annotated Snippet
struct ksmbd_conn_stats {
atomic_t open_files_count;
atomic64_t request_served;
};
struct ksmbd_transport;
struct ksmbd_conn {
struct smb_version_values *vals;
struct smb_version_ops *ops;
struct smb_version_cmds *cmds;
unsigned int max_cmds;
struct mutex srv_mutex;
int status;
unsigned int cli_cap;
bool stop_called;
union {
__be32 inet_addr;
#if IS_ENABLED(CONFIG_IPV6)
u8 inet6_addr[16];
#endif
};
unsigned int inet_hash;
char *request_buf;
struct ksmbd_transport *transport;
struct nls_table *local_nls;
struct unicode_map *um;
struct hlist_node hlist;
struct rw_semaphore session_lock;
/* smb session 1 per user */
struct xarray sessions;
unsigned long last_active;
/* How many request are running currently */
atomic_t req_running;
/* References which are made for this Server object*/
atomic_t r_count;
unsigned int total_credits;
unsigned int outstanding_credits;
spinlock_t credits_lock;
wait_queue_head_t req_running_q;
wait_queue_head_t r_count_q;
/* Lock to protect requests list*/
spinlock_t request_lock;
struct list_head requests;
struct list_head async_requests;
int connection_type;
struct ksmbd_conn_stats stats;
char ClientGUID[SMB2_CLIENT_GUID_SIZE];
struct ntlmssp_auth ntlmssp;
spinlock_t llist_lock;
struct list_head lock_list;
struct preauth_integrity_info *preauth_info;
bool need_neg;
unsigned int auth_mechs;
unsigned int preferred_auth_mech;
bool sign;
bool use_spnego:1;
__u16 cli_sec_mode;
__u16 srv_sec_mode;
/* dialect index that server chose */
__u16 dialect;
char *mechToken;
unsigned int mechTokenLen;
struct ksmbd_conn_ops *conn_ops;
/* Preauth Session Table */
struct list_head preauth_sess_table;
struct sockaddr_storage peer_addr;
/* Identifier for async message */
struct ida async_ida;
__le16 cipher_type;
__le16 compress_algorithm;
/* Negotiated SMB 3.1.1 compression capabilities. */
bool compress_chained;
bool compress_pattern;
bool posix_ext_supported;
bool signing_negotiated;
__le16 signing_algorithm;
bool binding;
atomic_t refcnt;
bool is_aapl;
struct work_struct release_work;
Annotation
- Immediate include surface: `linux/list.h`, `linux/inet.h`, `linux/ip.h`, `net/sock.h`, `net/tcp.h`, `net/inet_connection_sock.h`, `net/request_sock.h`, `linux/kthread.h`.
- Detected declarations: `struct smbdirect_buffer_descriptor_v1`, `struct ksmbd_conn_stats`, `struct ksmbd_transport`, `struct ksmbd_conn`, `struct ksmbd_conn_ops`, `struct ksmbd_transport_ops`, `struct ksmbd_transport`, `function ksmbd_conn_good`, `function ksmbd_conn_need_negotiate`, `function ksmbd_conn_need_setup`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.