summaryrefslogtreecommitdiff
path: root/block/blk.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2015-10-21 20:20:23 +0300
committerJens Axboe <axboe@fb.com>2015-10-21 23:43:44 +0300
commit5a48fc147d7f2718a5c7e73bc8c4067235791fc1 (patch)
tree5e13b5f618cd26419dc1cb53fe5f2fc48c4505a7 /block/blk.h
parentac6fc48c9fb7d3220ec4e0be0c29bb314ea75f9f (diff)
downloadlinux-5a48fc147d7f2718a5c7e73bc8c4067235791fc1.tar.xz
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/blk.h')
-rw-r--r--block/blk.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/block/blk.h b/block/blk.h
index 5b2cd393afbe..157c93d54dc9 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -87,6 +87,14 @@ static inline void blk_queue_enter_live(struct request_queue *q)
percpu_ref_get(&q->q_usage_counter);
}
+#ifdef CONFIG_BLK_DEV_INTEGRITY
+void blk_flush_integrity(void);
+#else
+static inline void blk_flush_integrity(void)
+{
+}
+#endif
+
void blk_rq_timed_out_timer(unsigned long data);
unsigned long blk_rq_timeout(unsigned long timeout);
void blk_add_timer(struct request *req);