History

block: allow use of per-cpu bio alloc cache by block drivers

Refine per-cpu bio alloc cache interfaces so that DM and other block drivers can properly create and use the cache: DM uses bioset_init_from_src() to do its final bioset initialization, so must update bioset_init_from_src() to set BIOSET_PERCPU_CACHE if %src bioset has a cache. Also move bio_clear_polled() to include/linux/bio.h to allow users outside of block core.

Mike Snitzer committed 4 years ago

Commit b53f3dc1 parent 0df71653 files · +8 −6Browse files

Showing the changes to include (1 of 3 files). Show all

Unified · Split

include/linux/bio.h+6−0
@@ -780,6 +780,12 @@ static inline void bio_set_polled(struct bio *bio, struct kiocb *kiocb) · 779 unmodified lines
780780 bio->bi_opf |= REQ_NOWAIT;
781781 }
782782
783+static inline void bio_clear_polled(struct bio *bio)
784+{
785+ /* can't support alloc cache if we turn off polling */
786+ bio->bi_opf &= ~(REQ_POLLED | REQ_ALLOC_CACHE);
787+}
788+
783789 struct bio *blk_next_bio(struct bio *bio, struct block_device *bdev,
784790 unsigned int nr_pages, unsigned int opf, gfp_t gfp);
785791

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t