]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - block/bio-integrity.c
block: blk_flush_integrity() for bio-based drivers
authorDan Williams <dan.j.williams@intel.com>
Wed, 21 Oct 2015 17:20:23 +0000 (13:20 -0400)
committerJens Axboe <axboe@fb.com>
Wed, 21 Oct 2015 20:43:44 +0000 (14:43 -0600)
commit5a48fc147d7f2718a5c7e73bc8c4067235791fc1
tree5e13b5f618cd26419dc1cb53fe5f2fc48c4505a7
parentac6fc48c9fb7d3220ec4e0be0c29bb314ea75f9f
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>
block/bio-integrity.c
block/blk-core.c
block/blk.h