drivers/md/dm-audit.h
Source file repositories/reference/linux-study-clean/drivers/md/dm-audit.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/md/dm-audit.h- Extension
.h- Size
- 1814 bytes
- Lines
- 67
- Domain
- Driver Families
- Bucket
- drivers/md
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device-mapper.hlinux/audit.h
Detected Declarations
function dm_audit_log_ctrfunction dm_audit_log_dtrfunction dm_audit_log_targetfunction dm_audit_log_bio
Annotated Snippet
#ifndef DM_AUDIT_H
#define DM_AUDIT_H
#include <linux/device-mapper.h>
#include <linux/audit.h>
#ifdef CONFIG_DM_AUDIT
void dm_audit_log_bio(const char *dm_msg_prefix, const char *op,
struct bio *bio, sector_t sector, int result);
/*
* dm_audit_log_ti() is not intended to be used directly in dm modules,
* the wrapper functions below should be called by dm modules instead.
*/
void dm_audit_log_ti(int audit_type, const char *dm_msg_prefix, const char *op,
struct dm_target *ti, int result);
static inline void dm_audit_log_ctr(const char *dm_msg_prefix,
struct dm_target *ti, int result)
{
dm_audit_log_ti(AUDIT_DM_CTRL, dm_msg_prefix, "ctr", ti, result);
}
static inline void dm_audit_log_dtr(const char *dm_msg_prefix,
struct dm_target *ti, int result)
{
dm_audit_log_ti(AUDIT_DM_CTRL, dm_msg_prefix, "dtr", ti, result);
}
static inline void dm_audit_log_target(const char *dm_msg_prefix, const char *op,
struct dm_target *ti, int result)
{
dm_audit_log_ti(AUDIT_DM_EVENT, dm_msg_prefix, op, ti, result);
}
#else
static inline void dm_audit_log_bio(const char *dm_msg_prefix, const char *op,
struct bio *bio, sector_t sector,
int result)
{
}
static inline void dm_audit_log_target(const char *dm_msg_prefix,
const char *op, struct dm_target *ti,
int result)
{
}
static inline void dm_audit_log_ctr(const char *dm_msg_prefix,
struct dm_target *ti, int result)
{
}
static inline void dm_audit_log_dtr(const char *dm_msg_prefix,
struct dm_target *ti, int result)
{
}
#endif
#endif
Annotation
- Immediate include surface: `linux/device-mapper.h`, `linux/audit.h`.
- Detected declarations: `function dm_audit_log_ctr`, `function dm_audit_log_dtr`, `function dm_audit_log_target`, `function dm_audit_log_bio`.
- Atlas domain: Driver Families / drivers/md.
- 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.