aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-05-08 21:33:51 -0400
committerJens Axboe <axboe@kernel.dk>2018-05-14 13:16:04 -0600
commit917a38c71af82185c39e31589587591fa764fb85 (patch)
tree738e2bd756e50f394cac0694d31070da18b3c3f6 /include/linux
parentblock: Convert bio_set to mempool_init() (diff)
downloadlinux-dev-917a38c71af82185c39e31589587591fa764fb85.tar.xz
linux-dev-917a38c71af82185c39e31589587591fa764fb85.zip
block: Add bioset_init()/bioset_exit()
Similarly to mempool_init()/mempool_exit(), take a pointer indirection out of allocation/freeing by allowing biosets to be embedded in other structs. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 720f7261d042..fa3cf94a5015 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -406,6 +406,8 @@ static inline struct bio *bio_next_split(struct bio *bio, int sectors,
return bio_split(bio, sectors, gfp, bs);
}
+extern int bioset_init(struct bio_set *, unsigned int, unsigned int, int flags);
+extern void bioset_exit(struct bio_set *);
extern struct bio_set *bioset_create(unsigned int, unsigned int, int flags);
enum {
BIOSET_NEED_BVECS = BIT(0),