In preparation for adding differently sized bios.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
struct bio_set *bioset_create(int bio_pool_size, int bvec_pool_size)
{
- struct bio_set *bs = kzalloc(sizeof(*bs), GFP_KERNEL);
+ struct bio_set *bs;
+ bs = kzalloc(sizeof(*bs), GFP_KERNEL);
if (!bs)
return NULL;
- bs->bio_pool = mempool_create_slab_pool(bio_pool_size, bio_slab);
+ bs->bio_slab = bio_slab;
+
+ bs->bio_pool = mempool_create_slab_pool(bio_pool_size, bs->bio_slab);
if (!bs->bio_pool)
goto bad;
#define BIOVEC_MAX_IDX (BIOVEC_NR_POOLS - 1)
struct bio_set {
+ struct kmem_cache *bio_slab;
mempool_t *bio_pool;
#if defined(CONFIG_BLK_DEV_INTEGRITY)
mempool_t *bio_integrity_pool;