drivers/nvdimm/virtio_pmem.h
Source file repositories/reference/linux-study-clean/drivers/nvdimm/virtio_pmem.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/nvdimm/virtio_pmem.h- Extension
.h- Size
- 1386 bytes
- Lines
- 60
- Domain
- Driver Families
- Bucket
- drivers/nvdimm
- 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/module.huapi/linux/virtio_pmem.hlinux/libnvdimm.hlinux/mutex.hlinux/spinlock.h
Detected Declarations
struct virtio_pmem_requeststruct virtio_pmem
Annotated Snippet
struct virtio_pmem_request {
struct virtio_pmem_req req;
struct virtio_pmem_resp resp;
/* Wait queue to process deferred work after ack from host */
wait_queue_head_t host_acked;
bool done;
/* Wait queue to process deferred work after virt queue buffer avail */
wait_queue_head_t wq_buf;
bool wq_buf_avail;
struct list_head list;
};
struct virtio_pmem {
struct virtio_device *vdev;
/* Virtio pmem request queue */
struct virtqueue *req_vq;
/* Serialize flush requests to the device. */
struct mutex flush_lock;
/* nvdimm bus registers virtio pmem device */
struct nvdimm_bus *nvdimm_bus;
struct nvdimm_bus_descriptor nd_desc;
/* List to store deferred work if virtqueue is full */
struct list_head req_list;
/* Synchronize virtqueue data */
spinlock_t pmem_lock;
/* Memory region information */
__u64 start;
__u64 size;
};
void virtio_pmem_host_ack(struct virtqueue *vq);
int async_pmem_flush(struct nd_region *nd_region, struct bio *bio);
#endif
Annotation
- Immediate include surface: `linux/module.h`, `uapi/linux/virtio_pmem.h`, `linux/libnvdimm.h`, `linux/mutex.h`, `linux/spinlock.h`.
- Detected declarations: `struct virtio_pmem_request`, `struct virtio_pmem`.
- Atlas domain: Driver Families / drivers/nvdimm.
- 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.