summaryrefslogtreecommitdiff
path: root/include/linux/bio.h
diff options
context:
space:
mode:
authorKeith Busch <kbusch@kernel.org>2025-08-27 07:12:51 -0700
committerJens Axboe <axboe@kernel.dk>2025-09-09 10:27:01 -0600
commitfec2e705729dc93de5399d8b139e4746805c3d81 (patch)
treea58658f3463c9367636ea8bc621fad0113c4ff68 /include/linux/bio.h
parentd7b1cdc9108f46f47a0899597d6fa270f64dd98c (diff)
block: check for valid bio while splitting
We're already iterating every segment, so check these for a valid IO lengths at the same time. Individual segment lengths will not be checked on passthrough commands. The read/write command segments must be sized to the dma alignment. Signed-off-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r--include/linux/bio.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 27cbff5b0356..13d1df02656a 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -322,8 +322,8 @@ static inline void bio_next_folio(struct folio_iter *fi, struct bio *bio)
void bio_trim(struct bio *bio, sector_t offset, sector_t size);
extern struct bio *bio_split(struct bio *bio, int sectors,
gfp_t gfp, struct bio_set *bs);
-int bio_split_rw_at(struct bio *bio, const struct queue_limits *lim,
- unsigned *segs, unsigned max_bytes);
+int bio_split_io_at(struct bio *bio, const struct queue_limits *lim,
+ unsigned *segs, unsigned max_bytes, unsigned len_align);
/**
* bio_next_split - get next @sectors from a bio, splitting if necessary