fs/smb/smbdirect/internal.h
Source file repositories/reference/linux-study-clean/fs/smb/smbdirect/internal.h
File Facts
- System
- Linux kernel
- Corpus path
fs/smb/smbdirect/internal.h- Extension
.h- Size
- 4572 bytes
- Lines
- 142
- 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/smbdirect.hpdu.hlinux/mutex.hsocket.h
Detected Declarations
struct smbdirect_module_statestruct smbdirect_device
Annotated Snippet
struct smbdirect_module_state {
struct mutex mutex;
struct {
struct workqueue_struct *accept;
struct workqueue_struct *connect;
struct workqueue_struct *idle;
struct workqueue_struct *refill;
struct workqueue_struct *immediate;
struct workqueue_struct *cleanup;
} workqueues;
struct {
rwlock_t lock;
struct list_head list;
} devices;
};
extern struct smbdirect_module_state smbdirect_globals;
#include "socket.h"
struct smbdirect_device {
struct list_head list;
struct ib_device *ib_dev;
/*
* copy of ib_dev->name,
* in order to print renames
*/
char ib_name[IB_DEVICE_NAME_MAX];
};
int smbdirect_socket_init_new(struct net *net, struct smbdirect_socket *sc);
int smbdirect_socket_init_accepting(struct rdma_cm_id *id, struct smbdirect_socket *sc);
void __smbdirect_socket_schedule_cleanup(struct smbdirect_socket *sc,
const char *macro_name,
unsigned int lvl,
const char *func,
unsigned int line,
int error,
enum smbdirect_socket_status *force_status);
#define smbdirect_socket_schedule_cleanup(__sc, __error) \
__smbdirect_socket_schedule_cleanup(__sc, \
"smbdirect_socket_schedule_cleanup", SMBDIRECT_LOG_ERR, \
__func__, __LINE__, __error, NULL)
#define smbdirect_socket_schedule_cleanup_lvl(__sc, __lvl, __error) \
__smbdirect_socket_schedule_cleanup(__sc, \
"smbdirect_socket_schedule_cleanup_lvl", __lvl, \
__func__, __LINE__, __error, NULL)
#define smbdirect_socket_schedule_cleanup_status(__sc, __lvl, __error, __status) do { \
enum smbdirect_socket_status __force_status = __status; \
__smbdirect_socket_schedule_cleanup(__sc, \
"smbdirect_socket_schedule_cleanup_status", __lvl, \
__func__, __LINE__, __error, &__force_status); \
} while (0)
void smbdirect_socket_destroy_sync(struct smbdirect_socket *sc);
int smbdirect_socket_wait_for_credits(struct smbdirect_socket *sc,
enum smbdirect_socket_status expected_status,
int unexpected_errno,
wait_queue_head_t *waitq,
atomic_t *total_credits,
int needed);
void smbdirect_connection_rdma_established(struct smbdirect_socket *sc);
void smbdirect_connection_negotiation_done(struct smbdirect_socket *sc);
int smbdirect_connection_create_qp(struct smbdirect_socket *sc);
void smbdirect_connection_destroy_qp(struct smbdirect_socket *sc);
int smbdirect_connection_create_mem_pools(struct smbdirect_socket *sc);
void smbdirect_connection_destroy_mem_pools(struct smbdirect_socket *sc);
struct smbdirect_send_io *smbdirect_connection_alloc_send_io(struct smbdirect_socket *sc);
void smbdirect_connection_free_send_io(struct smbdirect_send_io *msg);
struct smbdirect_recv_io *smbdirect_connection_get_recv_io(struct smbdirect_socket *sc);
void smbdirect_connection_put_recv_io(struct smbdirect_recv_io *msg);
void smbdirect_connection_reassembly_append_recv_io(struct smbdirect_socket *sc,
struct smbdirect_recv_io *msg,
u32 data_length);
Annotation
- Immediate include surface: `linux/smbdirect.h`, `pdu.h`, `linux/mutex.h`, `socket.h`.
- Detected declarations: `struct smbdirect_module_state`, `struct smbdirect_device`.
- 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.