drivers/target/target_core_rd.h
Source file repositories/reference/linux-study-clean/drivers/target/target_core_rd.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/target/target_core_rd.h- Extension
.h- Size
- 1550 bytes
- Lines
- 58
- Domain
- Driver Families
- Bucket
- drivers/target
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/types.htarget/target_core_base.h
Detected Declarations
struct rd_dev_sg_tablestruct rd_devstruct rd_host
Annotated Snippet
struct rd_dev_sg_table {
u32 page_start_offset;
u32 page_end_offset;
u32 rd_sg_count;
struct scatterlist *sg_table;
} ____cacheline_aligned;
#define RDF_HAS_PAGE_COUNT 0x01
#define RDF_NULLIO 0x02
#define RDF_DUMMY 0x04
struct rd_dev {
struct se_device dev;
u32 rd_flags;
/* Unique Ramdisk Device ID in Ramdisk HBA */
u32 rd_dev_id;
/* Total page count for ramdisk device */
u32 rd_page_count;
/* Number of SG tables in sg_table_array */
u32 sg_table_count;
/* Number of SG tables in sg_prot_array */
u32 sg_prot_count;
/* Array of rd_dev_sg_table_t containing scatterlists */
struct rd_dev_sg_table *sg_table_array;
/* Array of rd_dev_sg_table containing protection scatterlists */
struct rd_dev_sg_table *sg_prot_array;
/* Ramdisk HBA device is connected to */
struct rd_host *rd_host;
} ____cacheline_aligned;
struct rd_host {
u32 rd_host_dev_id_count;
u32 rd_host_id; /* Unique Ramdisk Host ID */
} ____cacheline_aligned;
#endif /* TARGET_CORE_RD_H */
Annotation
- Immediate include surface: `linux/module.h`, `linux/types.h`, `target/target_core_base.h`.
- Detected declarations: `struct rd_dev_sg_table`, `struct rd_dev`, `struct rd_host`.
- Atlas domain: Driver Families / drivers/target.
- Implementation status: integration 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.