diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2009-03-10 03:27:39 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-03-24 07:35:17 -0400 |
commit | 6d2a78e783416ba99e36beb1d4395b785b34e867 (patch) | |
tree | 5e1b772cfbfb8b5d089a9808a0232749f7ddf8be /include/linux | |
parent | 32ca163c9cdb33151d79e95a7cf244f62b5d4418 (diff) |
block: add private bio_set for bio integrity allocations
The integrity bio allocation needs its own bio_set to avoid violating
the mempool allocation rules and risking deadlocks.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/bio.h | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index d8bd43bfdcf5..b05b1d4d17d2 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -426,9 +426,6 @@ struct bio_set { | |||
426 | unsigned int front_pad; | 426 | unsigned int front_pad; |
427 | 427 | ||
428 | mempool_t *bio_pool; | 428 | mempool_t *bio_pool; |
429 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | ||
430 | mempool_t *bio_integrity_pool; | ||
431 | #endif | ||
432 | mempool_t *bvec_pool; | 429 | mempool_t *bvec_pool; |
433 | }; | 430 | }; |
434 | 431 | ||
@@ -519,9 +516,8 @@ static inline int bio_has_data(struct bio *bio) | |||
519 | 516 | ||
520 | #define bio_integrity(bio) (bio->bi_integrity != NULL) | 517 | #define bio_integrity(bio) (bio->bi_integrity != NULL) |
521 | 518 | ||
522 | extern struct bio_integrity_payload *bio_integrity_alloc_bioset(struct bio *, gfp_t, unsigned int, struct bio_set *); | ||
523 | extern struct bio_integrity_payload *bio_integrity_alloc(struct bio *, gfp_t, unsigned int); | 519 | extern struct bio_integrity_payload *bio_integrity_alloc(struct bio *, gfp_t, unsigned int); |
524 | extern void bio_integrity_free(struct bio *, struct bio_set *); | 520 | extern void bio_integrity_free(struct bio *); |
525 | extern int bio_integrity_add_page(struct bio *, struct page *, unsigned int, unsigned int); | 521 | extern int bio_integrity_add_page(struct bio *, struct page *, unsigned int, unsigned int); |
526 | extern int bio_integrity_enabled(struct bio *bio); | 522 | extern int bio_integrity_enabled(struct bio *bio); |
527 | extern int bio_integrity_set_tag(struct bio *, void *, unsigned int); | 523 | extern int bio_integrity_set_tag(struct bio *, void *, unsigned int); |
@@ -531,27 +527,21 @@ extern void bio_integrity_endio(struct bio *, int); | |||
531 | extern void bio_integrity_advance(struct bio *, unsigned int); | 527 | extern void bio_integrity_advance(struct bio *, unsigned int); |
532 | extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int); | 528 | extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int); |
533 | extern void bio_integrity_split(struct bio *, struct bio_pair *, int); | 529 | extern void bio_integrity_split(struct bio *, struct bio_pair *, int); |
534 | extern int bio_integrity_clone(struct bio *, struct bio *, gfp_t, struct bio_set *); | 530 | extern int bio_integrity_clone(struct bio *, struct bio *, gfp_t); |
535 | extern int bioset_integrity_create(struct bio_set *, int); | ||
536 | extern void bioset_integrity_free(struct bio_set *); | ||
537 | extern void bio_integrity_init_slab(void); | ||
538 | 531 | ||
539 | #else /* CONFIG_BLK_DEV_INTEGRITY */ | 532 | #else /* CONFIG_BLK_DEV_INTEGRITY */ |
540 | 533 | ||
541 | #define bio_integrity(a) (0) | 534 | #define bio_integrity(a) (0) |
542 | #define bioset_integrity_create(a, b) (0) | ||
543 | #define bio_integrity_prep(a) (0) | 535 | #define bio_integrity_prep(a) (0) |
544 | #define bio_integrity_enabled(a) (0) | 536 | #define bio_integrity_enabled(a) (0) |
545 | #define bio_integrity_clone(a, b, c,d ) (0) | 537 | #define bio_integrity_clone(a, b, c) (0) |
546 | #define bioset_integrity_free(a) do { } while (0) | 538 | #define bio_integrity_free(a) do { } while (0) |
547 | #define bio_integrity_free(a, b) do { } while (0) | ||
548 | #define bio_integrity_endio(a, b) do { } while (0) | 539 | #define bio_integrity_endio(a, b) do { } while (0) |
549 | #define bio_integrity_advance(a, b) do { } while (0) | 540 | #define bio_integrity_advance(a, b) do { } while (0) |
550 | #define bio_integrity_trim(a, b, c) do { } while (0) | 541 | #define bio_integrity_trim(a, b, c) do { } while (0) |
551 | #define bio_integrity_split(a, b, c) do { } while (0) | 542 | #define bio_integrity_split(a, b, c) do { } while (0) |
552 | #define bio_integrity_set_tag(a, b, c) do { } while (0) | 543 | #define bio_integrity_set_tag(a, b, c) do { } while (0) |
553 | #define bio_integrity_get_tag(a, b, c) do { } while (0) | 544 | #define bio_integrity_get_tag(a, b, c) do { } while (0) |
554 | #define bio_integrity_init_slab(a) do { } while (0) | ||
555 | 545 | ||
556 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ | 546 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ |
557 | 547 | ||