diff options
| author | Kent Overstreet <koverstreet@google.com> | 2012-08-24 07:56:11 -0400 |
|---|---|---|
| committer | Kent Overstreet <koverstreet@google.com> | 2013-03-23 17:15:25 -0400 |
| commit | 57fb233f078beb5d0437a4ae575fbd4d9eb9c738 (patch) | |
| tree | 9026554c544acb501bd1528fe91f358a2a1c1d7f | |
| parent | a937536b868b8369b98967929045f1df54234323 (diff) | |
block: Reorder struct bio_set
This is prep work for the next patch, which embeds a struct bio_list in
struct bio_set.
Signed-off-by: Kent Overstreet <koverstreet@google.com>
CC: Jens Axboe <axboe@kernel.dk>
| -rw-r--r-- | include/linux/bio.h | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 820e7aaad4fd..93d3d17a300d 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
| @@ -298,39 +298,6 @@ static inline int bio_associate_current(struct bio *bio) { return -ENOENT; } | |||
| 298 | static inline void bio_disassociate_task(struct bio *bio) { } | 298 | static inline void bio_disassociate_task(struct bio *bio) { } |
| 299 | #endif /* CONFIG_BLK_CGROUP */ | 299 | #endif /* CONFIG_BLK_CGROUP */ |
| 300 | 300 | ||
| 301 | /* | ||
| 302 | * bio_set is used to allow other portions of the IO system to | ||
| 303 | * allocate their own private memory pools for bio and iovec structures. | ||
| 304 | * These memory pools in turn all allocate from the bio_slab | ||
| 305 | * and the bvec_slabs[]. | ||
| 306 | */ | ||
| 307 | #define BIO_POOL_SIZE 2 | ||
| 308 | #define BIOVEC_NR_POOLS 6 | ||
| 309 | #define BIOVEC_MAX_IDX (BIOVEC_NR_POOLS - 1) | ||
| 310 | |||
| 311 | struct bio_set { | ||
| 312 | struct kmem_cache *bio_slab; | ||
| 313 | unsigned int front_pad; | ||
| 314 | |||
| 315 | mempool_t *bio_pool; | ||
| 316 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | ||
| 317 | mempool_t *bio_integrity_pool; | ||
| 318 | #endif | ||
| 319 | mempool_t *bvec_pool; | ||
| 320 | }; | ||
| 321 | |||
| 322 | struct biovec_slab { | ||
| 323 | int nr_vecs; | ||
| 324 | char *name; | ||
| 325 | struct kmem_cache *slab; | ||
| 326 | }; | ||
| 327 | |||
| 328 | /* | ||
| 329 | * a small number of entries is fine, not going to be performance critical. | ||
| 330 | * basically we just need to survive | ||
| 331 | */ | ||
| 332 | #define BIO_SPLIT_ENTRIES 2 | ||
| 333 | |||
| 334 | #ifdef CONFIG_HIGHMEM | 301 | #ifdef CONFIG_HIGHMEM |
| 335 | /* | 302 | /* |
| 336 | * remember never ever reenable interrupts between a bvec_kmap_irq and | 303 | * remember never ever reenable interrupts between a bvec_kmap_irq and |
| @@ -527,6 +494,39 @@ static inline struct bio *bio_list_get(struct bio_list *bl) | |||
| 527 | return bio; | 494 | return bio; |
| 528 | } | 495 | } |
| 529 | 496 | ||
| 497 | /* | ||
| 498 | * bio_set is used to allow other portions of the IO system to | ||
| 499 | * allocate their own private memory pools for bio and iovec structures. | ||
| 500 | * These memory pools in turn all allocate from the bio_slab | ||
| 501 | * and the bvec_slabs[]. | ||
| 502 | */ | ||
| 503 | #define BIO_POOL_SIZE 2 | ||
| 504 | #define BIOVEC_NR_POOLS 6 | ||
| 505 | #define BIOVEC_MAX_IDX (BIOVEC_NR_POOLS - 1) | ||
| 506 | |||
| 507 | struct bio_set { | ||
| 508 | struct kmem_cache *bio_slab; | ||
| 509 | unsigned int front_pad; | ||
| 510 | |||
| 511 | mempool_t *bio_pool; | ||
| 512 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | ||
| 513 | mempool_t *bio_integrity_pool; | ||
| 514 | #endif | ||
| 515 | mempool_t *bvec_pool; | ||
| 516 | }; | ||
| 517 | |||
| 518 | struct biovec_slab { | ||
| 519 | int nr_vecs; | ||
| 520 | char *name; | ||
| 521 | struct kmem_cache *slab; | ||
| 522 | }; | ||
| 523 | |||
| 524 | /* | ||
| 525 | * a small number of entries is fine, not going to be performance critical. | ||
| 526 | * basically we just need to survive | ||
| 527 | */ | ||
| 528 | #define BIO_SPLIT_ENTRIES 2 | ||
| 529 | |||
| 530 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | 530 | #if defined(CONFIG_BLK_DEV_INTEGRITY) |
| 531 | 531 | ||
| 532 | #define bip_vec_idx(bip, idx) (&(bip->bip_vec[(idx)])) | 532 | #define bip_vec_idx(bip, idx) (&(bip->bip_vec[(idx)])) |
