summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2014-02-07 13:45:39 -0700
committerJens Axboe <axboe@fb.com>2014-02-07 13:45:39 -0700
commit14ec77f352cb00ab8425ec2af03bd7e529eefe24 (patch)
tree7b5258c756c8aa58b7b48245d3854e406025488a /block
parent1be036e9464032362def6b3c13f57bfceefe2dab (diff)
blk-mq: Add bio_integrity setup to blk_mq_make_request
This patch adds the missing bio_integrity_enabled() + bio_integrity_prep() setup into blk_mq_make_request() in order to use DIF protection with scsi-mq. Cc: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block')
-rw-r--r--block/blk-mq.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index f1e63c2ece71..cee96234bf58 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -922,6 +922,11 @@ static void blk_mq_make_request(struct request_queue *q, struct bio *bio)
blk_queue_bounce(q, &bio);
+ if (bio_integrity_enabled(bio) && bio_integrity_prep(bio)) {
+ bio_endio(bio, -EIO);
+ return;
+ }
+
if (use_plug && blk_attempt_plug_merge(q, bio, &request_count))
return;