aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-10-22 14:32:58 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-12-29 02:28:46 -0500
commit1b4344986926da324b5cd10b683e5a1a5e1b7db3 (patch)
treef196fad09555f32e4464df2ea4c8fea17ad99e76
parent7ff9345ffac56743b5001561bc2dc1e041b79149 (diff)
bio: move the slab pointer inside the bio_set
In preparation for adding differently sized bios. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r--fs/bio.c7
-rw-r--r--include/linux/bio.h1
2 files changed, 6 insertions, 2 deletions
diff --git a/fs/bio.c b/fs/bio.c
index eb6b4683a265..1ab8986b0411 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -1404,12 +1404,15 @@ void bioset_free(struct bio_set *bs)
1404 1404
1405struct bio_set *bioset_create(int bio_pool_size, int bvec_pool_size) 1405struct bio_set *bioset_create(int bio_pool_size, int bvec_pool_size)
1406{ 1406{
1407 struct bio_set *bs = kzalloc(sizeof(*bs), GFP_KERNEL); 1407 struct bio_set *bs;
1408 1408
1409 bs = kzalloc(sizeof(*bs), GFP_KERNEL);
1409 if (!bs) 1410 if (!bs)
1410 return NULL; 1411 return NULL;
1411 1412
1412 bs->bio_pool = mempool_create_slab_pool(bio_pool_size, bio_slab); 1413 bs->bio_slab = bio_slab;
1414
1415 bs->bio_pool = mempool_create_slab_pool(bio_pool_size, bs->bio_slab);
1413 if (!bs->bio_pool) 1416 if (!bs->bio_pool)
1414 goto bad; 1417 goto bad;
1415 1418
diff --git a/include/linux/bio.h b/include/linux/bio.h
index d76e4bf22f29..9340098d75dc 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -400,6 +400,7 @@ static inline void bio_set_completion_cpu(struct bio *bio, unsigned int cpu)
400#define BIOVEC_MAX_IDX (BIOVEC_NR_POOLS - 1) 400#define BIOVEC_MAX_IDX (BIOVEC_NR_POOLS - 1)
401 401
402struct bio_set { 402struct bio_set {
403 struct kmem_cache *bio_slab;
403 mempool_t *bio_pool; 404 mempool_t *bio_pool;
404#if defined(CONFIG_BLK_DEV_INTEGRITY) 405#if defined(CONFIG_BLK_DEV_INTEGRITY)
405 mempool_t *bio_integrity_pool; 406 mempool_t *bio_integrity_pool;