block: introduce a function submit_bio_noacct_mq_direct
Subsystems (3)
Mikulas Patocka
maintainerPATCH 1/4 block: introduce a function submit_bio_noacct_mq_direct
Introduce a function that submits bio to a request-based device driver. The function doesn't offload requests to current->bio_list. It is expected to be called from device mapper, where current->bio_list is already set up.
--- block/blk-core.c | 16 ++++++++++++++++ include/linux/blkdev.h | 1 + 2 files changed, 17 insertions(+)
block/blk-core.c +16 -0
@@ -992,6 +992,22 @@ static blk_qc_t __submit_bio_noacct(strureturn ret; } +blk_qc_t submit_bio_noacct_mq_direct (struct bio *bio) +{ +struct gendisk *disk = bio->bi_bdev->bd_disk; + +if (unlikely (bio_queue_enter (bio) !=0 )) +return BLK_QC_T_NONE ; + +if (!blk_crypto_bio_prep (&bio)) { +blk_queue_exit (disk->queue); +return BLK_QC_T_NONE ; + } + +return blk_mq_submit_bio (bio); +} +EXPORT_SYMBOL (submit_bio_noacct_mq_direct); +static blk_qc_t __submit_bio_noacct_mq (struct bio *bio) {struct bio_list bio_list[2 ] = { };
include/linux/blkdev.h +1 -0
@@ -912,6 +912,7 @@ static inline void rq_flush_dcache_pagesextern int blk_register_queue (struct gendisk *disk);extern void blk_unregister_queue (struct gendisk *disk); +blk_qc_t submit_bio_noacct_mq_direct (struct bio *bio);blk_qc_t submit_bio_noacct (struct bio *bio);extern void blk_rq_init (struct request_queue *q,struct request *rq);extern void blk_put_request (struct request *);
--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel
Jens Axboe
maintainerOn 3/2/21 12:05 PM, Mikulas Patocka wrote:
There seems to be something wrong with how this series is being sent out. I have 1/4 and 3/4, but both are just attachments.
Signature · 6 lines
Jens Axboe -- dm-devel mailing list [email protected] https://listman.redhat.com/mailman/listinfo/dm-devel
Mikulas Patocka
maintainerQuoted 7 lines · Jens Axboe
On 3/2/21 12:05 PM, Mikulas Patocka wrote:
There seems to be something wrong with how this series is being sent out. I have 1/4 and 3/4, but both are just attachments.
Signature · 1 line
Jens Axboe
I used quilt to send it. I don't know what's wrong with it - if you look at archives at
https://listman.redhat.com/archives/dm-devel/2021-March/thread.html , it seems normal.
Mikulas
--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel
Jens Axboe
maintainerQuoted 9 lines · Mikulas Patocka
Quoted 5 lines · Jens Axboe
On 3/2/21 12:05 PM, Mikulas Patocka wrote:
There seems to be something wrong with how this series is being sent out. I have 1/4 and 3/4, but both are just attachments.
Quoted 7 lines
Quoted 2 lines
Signature · 1 line
Jens AxboeI used quilt to send it. I don't know what's wrong with it - if you look at archives at
https://listman.redhat.com/archives/dm-devel/2021-March/thread.html , it seems normal.
I guess the archives handle it, but it just shows up as an empty email with an attachment. Not very conducive to review, so I do suggest you fix how you're sending them out.
Signature · 6 lines
Jens Axboe -- dm-devel mailing list [email protected] https://listman.redhat.com/mailman/listinfo/dm-devel