diff options
| author | Christoph Hellwig <hch@lst.de> | 2025-05-07 14:04:28 +0200 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-05-07 07:31:07 -0600 |
| commit | 8dd16f5e34693aa0aa6a4ed48427045008097e64 (patch) | |
| tree | 6c2645548aa5516cd416400838ab31fd72d04c08 /include/linux/bio.h | |
| parent | 75f88659e47dc570bdebddf77d7a3cd5f0845612 (diff) | |
| download | lwn-8dd16f5e34693aa0aa6a4ed48427045008097e64.tar.gz lwn-8dd16f5e34693aa0aa6a4ed48427045008097e64.zip | |
block: add a bio_add_vmalloc helpers
Add a helper to add a vmalloc region to a bio, abstracting away the
vmalloc addresses from the underlying pages and another one wrapping
it for the simple case where all data fits into a single bio.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20250507120451.4000627-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/bio.h')
| -rw-r--r-- | include/linux/bio.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 128b1c6ca648..5d880903bcc5 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -433,6 +433,9 @@ static inline unsigned int bio_add_max_vecs(void *kaddr, unsigned int len) return 1; } +unsigned int bio_add_vmalloc_chunk(struct bio *bio, void *vaddr, unsigned len); +bool bio_add_vmalloc(struct bio *bio, void *vaddr, unsigned int len); + int submit_bio_wait(struct bio *bio); int bdev_rw_virt(struct block_device *bdev, sector_t sector, void *data, size_t len, enum req_op op); |
