diff options
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 627ed0c59..d1a63defd 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -48,6 +48,8 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(block_unplug); DEFINE_IDA(blk_queue_ida); +int trap_non_toi_io; + /* * For the allocated request tables */ @@ -1988,6 +1990,9 @@ void submit_bio(int rw, struct bio *bio) { bio->bi_rw |= rw; + if (unlikely(trap_non_toi_io)) + BUG_ON(!(bio->bi_flags & (1 << BIO_TOI))); + /* * If it's a regular read/write or a barrier with data attached, * go through the normal accounting stuff before submission. |