diff options
author | Dan Williams <dan.j.williams@intel.com> | 2015-10-21 13:20:23 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-10-21 14:43:44 -0600 |
commit | 5a48fc147d7f2718a5c7e73bc8c4067235791fc1 (patch) | |
tree | 5e13b5f618cd26419dc1cb53fe5f2fc48c4505a7 /block/bio-integrity.c | |
parent | ac6fc48c9fb7d3220ec4e0be0c29bb314ea75f9f (diff) | |
download | linux-exynos-5a48fc147d7f2718a5c7e73bc8c4067235791fc1.tar.gz linux-exynos-5a48fc147d7f2718a5c7e73bc8c4067235791fc1.tar.bz2 linux-exynos-5a48fc147d7f2718a5c7e73bc8c4067235791fc1.zip |
block: blk_flush_integrity() for bio-based drivers
Since they lack requests to pin the request_queue active, synchronous
bio-based drivers may have in-flight integrity work from
bio_integrity_endio() that is not flushed by blk_freeze_queue(). Flush
that work to prevent races to free the queue and the final usage of the
blk_integrity profile.
This is temporary unless/until bio-based drivers start to generically
take a q_usage_counter reference while a bio is in-flight.
Cc: Martin K. Petersen <martin.petersen@oracle.com>
[martin: fix the CONFIG_BLK_DEV_INTEGRITY=n case]
Tested-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/bio-integrity.c')
-rw-r--r-- | block/bio-integrity.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/block/bio-integrity.c b/block/bio-integrity.c index 6a90eca9cea1..f6325d573c10 100644 --- a/block/bio-integrity.c +++ b/block/bio-integrity.c @@ -32,6 +32,11 @@ static struct kmem_cache *bip_slab; static struct workqueue_struct *kintegrityd_wq; +void blk_flush_integrity(void) +{ + flush_workqueue(kintegrityd_wq); +} + /** * bio_integrity_alloc - Allocate integrity payload and attach it to bio * @bio: bio to attach integrity metadata to |