fs/smb/server/vfs_cache.h
Source file repositories/reference/linux-study-clean/fs/smb/server/vfs_cache.h
File Facts
- System
- Linux kernel
- Corpus path
fs/smb/server/vfs_cache.h- Extension
.h- Size
- 5434 bytes
- Lines
- 206
- 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/file.hlinux/fs.hlinux/mutex.hlinux/rwsem.hlinux/spinlock.hlinux/idr.hlinux/workqueue.hvfs.hmgmt/share_config.h
Detected Declarations
struct ksmbd_connstruct ksmbd_sessionstruct ksmbd_lockstruct streamstruct ksmbd_inodestruct durable_ownerstruct ksmbd_filestruct ksmbd_file_tableenum KSMBD_INODE_STATUSfunction set_ctx_actorfunction has_file_idfunction ksmbd_stream_fd
Annotated Snippet
struct ksmbd_lock {
struct file_lock *fl;
struct list_head clist;
struct list_head flist;
struct list_head llist;
unsigned int flags;
int cmd;
int zero_len;
unsigned long long start;
unsigned long long end;
};
struct stream {
char *name;
ssize_t size;
loff_t pos;
};
struct ksmbd_inode {
struct rw_semaphore m_lock;
atomic_t m_count;
atomic_t op_count;
/* opinfo count for streams */
atomic_t sop_count;
struct dentry *m_de;
unsigned int m_flags;
struct hlist_node m_hash;
struct list_head m_fp_list;
struct list_head m_op_list;
struct oplock_info *m_opinfo;
__le32 m_fattr;
};
enum {
FP_NEW = 0,
FP_INITED,
FP_CLOSED
};
/* Owner information for durable handle reconnect */
struct durable_owner {
unsigned int uid;
unsigned int gid;
char *name;
};
struct ksmbd_file {
struct file *filp;
u64 persistent_id;
u64 volatile_id;
spinlock_t f_lock;
struct ksmbd_inode *f_ci;
struct ksmbd_inode *f_parent_ci;
struct oplock_info __rcu *f_opinfo;
struct ksmbd_conn *conn;
struct ksmbd_tree_connect *tcon;
atomic_t refcount;
__le32 daccess;
__le32 saccess;
__le32 coption;
__le32 cdoption;
__u64 create_time;
__u64 itime;
bool is_nt_open;
bool attrib_only;
char client_guid[16];
char create_guid[16];
char app_instance_id[16];
struct stream stream;
struct list_head node;
struct list_head blocked_works;
struct list_head lock_list;
unsigned int durable_timeout;
unsigned int durable_scavenger_timeout;
/* if ls is happening on directory, below is valid*/
struct ksmbd_readdir_data readdir_data;
struct mutex readdir_lock;
int dot_dotdot[2];
unsigned int f_state;
bool reserve_lease_break;
bool is_durable;
bool is_persistent;
Annotation
- Immediate include surface: `linux/file.h`, `linux/fs.h`, `linux/mutex.h`, `linux/rwsem.h`, `linux/spinlock.h`, `linux/idr.h`, `linux/workqueue.h`, `vfs.h`.
- Detected declarations: `struct ksmbd_conn`, `struct ksmbd_session`, `struct ksmbd_lock`, `struct stream`, `struct ksmbd_inode`, `struct durable_owner`, `struct ksmbd_file`, `struct ksmbd_file_table`, `enum KSMBD_INODE_STATUS`, `function set_ctx_actor`.
- 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.