mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 06:41:39 +00:00
block: move blk_rq_bio_prep() to linux/blk-mq.h
This is a preparation patch to have minimal block layer request bio append functionality in the context of the NVMeOF Passthru driver which falls in the fast path and doesn't need calls from blk_rq_append_bio(). Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Reviewed-by: Logan Gunthorpe <logang@deltatee.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
47e9730c26
commit
53ffabfd4d
2 changed files with 12 additions and 12 deletions
|
@ -593,6 +593,18 @@ static inline void blk_mq_cleanup_rq(struct request *rq)
|
|||
rq->q->mq_ops->cleanup_rq(rq);
|
||||
}
|
||||
|
||||
static inline void blk_rq_bio_prep(struct request *rq, struct bio *bio,
|
||||
unsigned int nr_segs)
|
||||
{
|
||||
rq->nr_phys_segments = nr_segs;
|
||||
rq->__data_len = bio->bi_iter.bi_size;
|
||||
rq->bio = rq->biotail = bio;
|
||||
rq->ioprio = bio_prio(bio);
|
||||
|
||||
if (bio->bi_disk)
|
||||
rq->rq_disk = bio->bi_disk;
|
||||
}
|
||||
|
||||
blk_qc_t blk_mq_submit_bio(struct bio *bio);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue