drivers/md/dm-vdo/indexer/io-factory.h
Source file repositories/reference/linux-study-clean/drivers/md/dm-vdo/indexer/io-factory.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/md/dm-vdo/indexer/io-factory.h- Extension
.h- Size
- 2008 bytes
- Lines
- 65
- 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/dm-bufio.h
Detected Declarations
struct buffered_readerstruct buffered_writerstruct io_factory
Annotated Snippet
#ifndef UDS_IO_FACTORY_H
#define UDS_IO_FACTORY_H
#include <linux/dm-bufio.h>
/*
* The I/O factory manages all low-level I/O operations to the underlying storage device. Its main
* clients are the index layout and the volume. The buffered reader and buffered writer interfaces
* are helpers for accessing data in a contiguous range of storage blocks.
*/
struct buffered_reader;
struct buffered_writer;
struct io_factory;
enum {
UDS_BLOCK_SIZE = 4096,
SECTORS_PER_BLOCK = UDS_BLOCK_SIZE >> SECTOR_SHIFT,
};
int __must_check uds_make_io_factory(struct block_device *bdev,
struct io_factory **factory_ptr);
int __must_check uds_replace_storage(struct io_factory *factory,
struct block_device *bdev);
void uds_put_io_factory(struct io_factory *factory);
size_t __must_check uds_get_writable_size(struct io_factory *factory);
int __must_check uds_make_bufio(struct io_factory *factory, off_t block_offset,
size_t block_size, unsigned int reserved_buffers,
struct dm_bufio_client **client_ptr);
int __must_check uds_make_buffered_reader(struct io_factory *factory, off_t offset,
u64 block_count,
struct buffered_reader **reader_ptr);
void uds_free_buffered_reader(struct buffered_reader *reader);
int __must_check uds_read_from_buffered_reader(struct buffered_reader *reader, u8 *data,
size_t length);
int __must_check uds_verify_buffered_data(struct buffered_reader *reader, const u8 *value,
size_t length);
int __must_check uds_make_buffered_writer(struct io_factory *factory, off_t offset,
u64 block_count,
struct buffered_writer **writer_ptr);
void uds_free_buffered_writer(struct buffered_writer *buffer);
int __must_check uds_write_to_buffered_writer(struct buffered_writer *writer,
const u8 *data, size_t length);
int __must_check uds_flush_buffered_writer(struct buffered_writer *writer);
#endif /* UDS_IO_FACTORY_H */
Annotation
- Immediate include surface: `linux/dm-bufio.h`.
- Detected declarations: `struct buffered_reader`, `struct buffered_writer`, `struct io_factory`.
- 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.