Commit df677140 authored by Martin K. Petersen's avatar Martin K. Petersen Committed by Jens Axboe

block: biovec_slab vs. CONFIG_BLK_DEV_INTEGRITY

The block integrity subsystem no longer uses the bio_vec slabs so this
code can safely be compiled in.
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent de701c74
...@@ -43,7 +43,7 @@ static mempool_t *bio_split_pool __read_mostly; ...@@ -43,7 +43,7 @@ static mempool_t *bio_split_pool __read_mostly;
* unsigned short * unsigned short
*/ */
#define BV(x) { .nr_vecs = x, .name = "biovec-"__stringify(x) } #define BV(x) { .nr_vecs = x, .name = "biovec-"__stringify(x) }
struct biovec_slab bvec_slabs[BIOVEC_NR_POOLS] __read_mostly = { static struct biovec_slab bvec_slabs[BIOVEC_NR_POOLS] __read_mostly = {
BV(1), BV(4), BV(16), BV(64), BV(128), BV(BIO_MAX_PAGES), BV(1), BV(4), BV(16), BV(64), BV(128), BV(BIO_MAX_PAGES),
}; };
#undef BV #undef BV
...@@ -1656,12 +1656,10 @@ static void __init biovec_init_slabs(void) ...@@ -1656,12 +1656,10 @@ static void __init biovec_init_slabs(void)
int size; int size;
struct biovec_slab *bvs = bvec_slabs + i; struct biovec_slab *bvs = bvec_slabs + i;
#ifndef CONFIG_BLK_DEV_INTEGRITY
if (bvs->nr_vecs <= BIO_INLINE_VECS) { if (bvs->nr_vecs <= BIO_INLINE_VECS) {
bvs->slab = NULL; bvs->slab = NULL;
continue; continue;
} }
#endif
size = bvs->nr_vecs * sizeof(struct bio_vec); size = bvs->nr_vecs * sizeof(struct bio_vec);
bvs->slab = kmem_cache_create(bvs->name, size, 0, bvs->slab = kmem_cache_create(bvs->name, size, 0,
......
...@@ -304,7 +304,6 @@ struct biovec_slab { ...@@ -304,7 +304,6 @@ struct biovec_slab {
}; };
extern struct bio_set *fs_bio_set; extern struct bio_set *fs_bio_set;
extern struct biovec_slab bvec_slabs[BIOVEC_NR_POOLS] __read_mostly;
/* /*
* a small number of entries is fine, not going to be performance critical. * a small number of entries is fine, not going to be performance critical.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment