diff options
author | NeilBrown <neilb@suse.com> | 2017-06-18 14:38:57 +1000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-06-18 12:40:59 -0600 |
commit | 011067b05668b05aae88e5a24cff0ca0a67ca0b0 (patch) | |
tree | b56fb4114e8bd71ffd36520f1b4cf7e4e49f1c79 /block/blk-core.c | |
parent | af67c31fba3b879b241536a48df703a2eee18ebf (diff) | |
download | linux-stable-011067b05668b05aae88e5a24cff0ca0a67ca0b0.tar.gz linux-stable-011067b05668b05aae88e5a24cff0ca0a67ca0b0.tar.bz2 linux-stable-011067b05668b05aae88e5a24cff0ca0a67ca0b0.zip |
blk: replace bioset_create_nobvec() with a flags arg to bioset_create()
"flags" arguments are often seen as good API design as they allow
easy extensibility.
bioset_create_nobvec() is implemented internally as a variation in
flags passed to __bioset_create().
To support future extension, make the internal structure part of the
API.
i.e. add a 'flags' argument to bioset_create() and discard
bioset_create_nobvec().
Note that the bio_split allocations in drivers/md/raid* do not need
the bvec mempool - they should have used bioset_create_nobvec().
Suggested-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 31b5ece6b18e..62cf92550512 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -790,7 +790,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id) if (q->id < 0) goto fail_q; - q->bio_split = bioset_create(BIO_POOL_SIZE, 0); + q->bio_split = bioset_create(BIO_POOL_SIZE, 0, BIOSET_NEED_BVECS); if (!q->bio_split) goto fail_id; |