summaryrefslogtreecommitdiffstats
path: root/block/blk.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-11-17 07:13:58 +0100
committerJens Axboe <axboe@kernel.dk>2021-11-29 14:34:50 +0100
commit06c8c691e2820077936e59ad334eb806e90b69eb (patch)
treea2878ddf632e5d6c84e4a75ac5f81d1cb5365ef5 /block/blk.h
parentblk-mq: move blk_mq_flush_plug_list (diff)
downloadlinux-06c8c691e2820077936e59ad334eb806e90b69eb.tar.xz
linux-06c8c691e2820077936e59ad334eb806e90b69eb.zip
block: move request based cloning helpers to blk-mq.c
Keep all the request based code together. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Link: https://lore.kernel.org/r/20211117061404.331732-6-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk.h')
-rw-r--r--block/blk.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/block/blk.h b/block/blk.h
index ccde6e6f1736..8a3761b6dc33 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -493,4 +493,14 @@ int disk_register_independent_access_ranges(struct gendisk *disk,
struct blk_independent_access_ranges *new_iars);
void disk_unregister_independent_access_ranges(struct gendisk *disk);
+#ifdef CONFIG_FAIL_MAKE_REQUEST
+bool should_fail_request(struct block_device *part, unsigned int bytes);
+#else /* CONFIG_FAIL_MAKE_REQUEST */
+static inline bool should_fail_request(struct block_device *part,
+ unsigned int bytes)
+{
+ return false;
+}
+#endif /* CONFIG_FAIL_MAKE_REQUEST */
+
#endif /* BLK_INTERNAL_H */