Skip to content

Commit 5a6c35f

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: remove direct_make_request
Now that submit_bio_noacct has a decent blk-mq fast path there is no more need for this bypass. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent ff93ea0 commit 5a6c35f

File tree

4 files changed

+2
-34
lines changed

4 files changed

+2
-34
lines changed

block/blk-core.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,34 +1211,6 @@ blk_qc_t submit_bio_noacct(struct bio *bio)
12111211
}
12121212
EXPORT_SYMBOL(submit_bio_noacct);
12131213

1214-
/**
1215-
* direct_make_request - hand a buffer directly to its device driver for I/O
1216-
* @bio: The bio describing the location in memory and on the device.
1217-
*
1218-
* This function behaves like submit_bio_noacct(), but does not protect
1219-
* against recursion. Must only be used if the called driver is known
1220-
* to be blk-mq based.
1221-
*/
1222-
blk_qc_t direct_make_request(struct bio *bio)
1223-
{
1224-
struct gendisk *disk = bio->bi_disk;
1225-
1226-
if (WARN_ON_ONCE(!disk->queue->mq_ops)) {
1227-
bio_io_error(bio);
1228-
return BLK_QC_T_NONE;
1229-
}
1230-
if (!submit_bio_checks(bio))
1231-
return BLK_QC_T_NONE;
1232-
if (unlikely(bio_queue_enter(bio)))
1233-
return BLK_QC_T_NONE;
1234-
if (!blk_crypto_bio_prep(&bio)) {
1235-
blk_queue_exit(disk->queue);
1236-
return BLK_QC_T_NONE;
1237-
}
1238-
return blk_mq_submit_bio(bio);
1239-
}
1240-
EXPORT_SYMBOL_GPL(direct_make_request);
1241-
12421214
/**
12431215
* submit_bio - submit a bio to the block device layer for I/O
12441216
* @bio: The &struct bio which describes the I/O

drivers/md/dm.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,10 +1302,7 @@ static blk_qc_t __map_bio(struct dm_target_io *tio)
13021302
/* the bio has been remapped so dispatch it */
13031303
trace_block_bio_remap(clone->bi_disk->queue, clone,
13041304
bio_dev(io->orig_bio), sector);
1305-
if (md->type == DM_TYPE_NVME_BIO_BASED)
1306-
ret = direct_make_request(clone);
1307-
else
1308-
ret = submit_bio_noacct(clone);
1305+
ret = submit_bio_noacct(clone);
13091306
break;
13101307
case DM_MAPIO_KILL:
13111308
free_tio(tio);

drivers/nvme/host/multipath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ blk_qc_t nvme_ns_head_submit_bio(struct bio *bio)
314314
trace_block_bio_remap(bio->bi_disk->queue, bio,
315315
disk_devt(ns->head->disk),
316316
bio->bi_iter.bi_sector);
317-
ret = direct_make_request(bio);
317+
ret = submit_bio_noacct(bio);
318318
} else if (nvme_available_path(head)) {
319319
dev_warn_ratelimited(dev, "no usable path - requeuing I/O\n");
320320

include/linux/blkdev.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,6 @@ static inline void rq_flush_dcache_pages(struct request *rq)
853853
extern int blk_register_queue(struct gendisk *disk);
854854
extern void blk_unregister_queue(struct gendisk *disk);
855855
blk_qc_t submit_bio_noacct(struct bio *bio);
856-
extern blk_qc_t direct_make_request(struct bio *bio);
857856
extern void blk_rq_init(struct request_queue *q, struct request *rq);
858857
extern void blk_put_request(struct request *);
859858
extern struct request *blk_get_request(struct request_queue *, unsigned int op,

0 commit comments

Comments
 (0)