block: add a blk_alloc_discard_bio helper
authorChristoph Hellwig <hch@lst.de>
Mon, 6 May 2024 04:20:25 +0000 (06:20 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 7 May 2024 13:29:42 +0000 (07:29 -0600)
commite8b4869bc78da1a71f2a2ab476caf50c1dcfeed0
treede7b879ae94655a52d6d48a0b7909689fb4572a6
parent81c2168c229bab0665e862937bb476f18cff056d
block: add a blk_alloc_discard_bio helper

Factor out a helper from __blkdev_issue_discard that chews off as much as
possible from a discard range and allocates a bio for it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20240506042027.2289826-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-lib.c
include/linux/bio.h