File tree Expand file tree Collapse file tree 3 files changed +9
-20
lines changed Expand file tree Collapse file tree 3 files changed +9
-20
lines changed Original file line number Diff line number Diff line change @@ -361,7 +361,7 @@ void blk_mq_sched_dispatch_requests(struct blk_mq_hw_ctx *hctx)
361
361
}
362
362
}
363
363
364
- bool __blk_mq_sched_bio_merge (struct request_queue * q , struct bio * bio ,
364
+ bool blk_mq_sched_bio_merge (struct request_queue * q , struct bio * bio ,
365
365
unsigned int nr_segs )
366
366
{
367
367
struct elevator_queue * e = q -> elevator ;
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ void blk_mq_sched_assign_ioc(struct request *rq);
12
12
13
13
bool blk_mq_sched_try_merge (struct request_queue * q , struct bio * bio ,
14
14
unsigned int nr_segs , struct request * * merged_request );
15
- bool __blk_mq_sched_bio_merge (struct request_queue * q , struct bio * bio ,
15
+ bool blk_mq_sched_bio_merge (struct request_queue * q , struct bio * bio ,
16
16
unsigned int nr_segs );
17
17
bool blk_mq_sched_try_insert_merge (struct request_queue * q , struct request * rq ,
18
18
struct list_head * free );
@@ -42,16 +42,6 @@ static inline bool bio_mergeable(struct bio *bio)
42
42
return !(bio -> bi_opf & REQ_NOMERGE_FLAGS );
43
43
}
44
44
45
- static inline bool
46
- blk_mq_sched_bio_merge (struct request_queue * q , struct bio * bio ,
47
- unsigned int nr_segs )
48
- {
49
- if (blk_queue_nomerges (q ) || !bio_mergeable (bio ))
50
- return false;
51
-
52
- return __blk_mq_sched_bio_merge (q , bio , nr_segs );
53
- }
54
-
55
45
static inline bool
56
46
blk_mq_sched_allow_merge (struct request_queue * q , struct request * rq ,
57
47
struct bio * bio )
Original file line number Diff line number Diff line change @@ -2481,7 +2481,6 @@ void blk_mq_submit_bio(struct bio *bio)
2481
2481
{
2482
2482
struct request_queue * q = bdev_get_queue (bio -> bi_bdev );
2483
2483
const int is_sync = op_is_sync (bio -> bi_opf );
2484
- const int is_flush_fua = op_is_flush (bio -> bi_opf );
2485
2484
struct request * rq ;
2486
2485
struct blk_plug * plug ;
2487
2486
bool same_queue_rq = false;
@@ -2495,12 +2494,12 @@ void blk_mq_submit_bio(struct bio *bio)
2495
2494
if (!bio_integrity_prep (bio ))
2496
2495
goto queue_exit ;
2497
2496
2498
- if (!is_flush_fua && ! blk_queue_nomerges (q ) &&
2499
- blk_attempt_plug_merge (q , bio , nr_segs , & same_queue_rq ))
2500
- goto queue_exit ;
2501
-
2502
- if ( blk_mq_sched_bio_merge ( q , bio , nr_segs ))
2503
- goto queue_exit ;
2497
+ if (!blk_queue_nomerges (q ) && bio_mergeable ( bio )) {
2498
+ if ( blk_attempt_plug_merge (q , bio , nr_segs , & same_queue_rq ))
2499
+ goto queue_exit ;
2500
+ if ( blk_mq_sched_bio_merge ( q , bio , nr_segs ))
2501
+ goto queue_exit ;
2502
+ }
2504
2503
2505
2504
rq_qos_throttle (q , bio );
2506
2505
@@ -2543,7 +2542,7 @@ void blk_mq_submit_bio(struct bio *bio)
2543
2542
return ;
2544
2543
}
2545
2544
2546
- if (is_flush_fua && blk_insert_flush (rq ))
2545
+ if (op_is_flush ( bio -> bi_opf ) && blk_insert_flush (rq ))
2547
2546
return ;
2548
2547
2549
2548
if (plug && (q -> nr_hw_queues == 1 ||
You can’t perform that action at this time.
0 commit comments