mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-02 10:43:57 +08:00
block: move bio_mergeable out of bio.h
bio_mergeable is only needed by I/O schedulers, so move it to blk-mq-sched.h. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20211012161804.991559-4-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
11d9cab1ca
commit
8addffd657
@ -37,6 +37,11 @@ static inline void blk_mq_sched_restart(struct blk_mq_hw_ctx *hctx)
|
|||||||
__blk_mq_sched_restart(hctx);
|
__blk_mq_sched_restart(hctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool bio_mergeable(struct bio *bio)
|
||||||
|
{
|
||||||
|
return !(bio->bi_opf & REQ_NOMERGE_FLAGS);
|
||||||
|
}
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
blk_mq_sched_bio_merge(struct request_queue *q, struct bio *bio,
|
blk_mq_sched_bio_merge(struct request_queue *q, struct bio *bio,
|
||||||
unsigned int nr_segs)
|
unsigned int nr_segs)
|
||||||
|
@ -69,14 +69,6 @@ static inline bool bio_no_advance_iter(const struct bio *bio)
|
|||||||
bio_op(bio) == REQ_OP_WRITE_ZEROES;
|
bio_op(bio) == REQ_OP_WRITE_ZEROES;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool bio_mergeable(struct bio *bio)
|
|
||||||
{
|
|
||||||
if (bio->bi_opf & REQ_NOMERGE_FLAGS)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline unsigned int bio_cur_bytes(struct bio *bio)
|
static inline unsigned int bio_cur_bytes(struct bio *bio)
|
||||||
{
|
{
|
||||||
if (bio_has_data(bio))
|
if (bio_has_data(bio))
|
||||||
|
Loading…
Reference in New Issue
Block a user