fs/smb/server/stats.h
Source file repositories/reference/linux-study-clean/fs/smb/server/stats.h
File Facts
- System
- Linux kernel
- Corpus path
fs/smb/server/stats.h- Extension
.h- Size
- 1884 bytes
- Lines
- 74
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct ksmbd_countersfunction ksmbd_counter_incfunction ksmbd_counter_decfunction ksmbd_counter_addfunction ksmbd_counter_subfunction ksmbd_counter_inc_reqsfunction ksmbd_counter_sumfunction ksmbd_counter_inc
Annotated Snippet
struct ksmbd_counters {
struct percpu_counter counters[KSMBD_COUNTER_MAX];
};
static inline void ksmbd_counter_inc(int type)
{
percpu_counter_inc(&ksmbd_counters.counters[type]);
}
static inline void ksmbd_counter_dec(int type)
{
percpu_counter_dec(&ksmbd_counters.counters[type]);
}
static inline void ksmbd_counter_add(int type, s64 value)
{
percpu_counter_add(&ksmbd_counters.counters[type], value);
}
static inline void ksmbd_counter_sub(int type, s64 value)
{
percpu_counter_sub(&ksmbd_counters.counters[type], value);
}
static inline void ksmbd_counter_inc_reqs(unsigned int cmd)
{
if (cmd < KSMBD_COUNTER_MAX_REQS)
percpu_counter_inc(&ksmbd_counters.counters[KSMBD_COUNTER_FIRST_REQ + cmd]);
}
static inline s64 ksmbd_counter_sum(int type)
{
return percpu_counter_sum_positive(&ksmbd_counters.counters[type]);
}
#else
static inline void ksmbd_counter_inc(int type) {}
static inline void ksmbd_counter_dec(int type) {}
static inline void ksmbd_counter_add(int type, s64 value) {}
static inline void ksmbd_counter_sub(int type, s64 value) {}
static inline void ksmbd_counter_inc_reqs(unsigned int cmd) {}
static inline s64 ksmbd_counter_sum(int type) { return 0; }
#endif
#endif
Annotation
- Detected declarations: `struct ksmbd_counters`, `function ksmbd_counter_inc`, `function ksmbd_counter_dec`, `function ksmbd_counter_add`, `function ksmbd_counter_sub`, `function ksmbd_counter_inc_reqs`, `function ksmbd_counter_sum`, `function ksmbd_counter_inc`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
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.