block: don't set REQ_NOMERGE unnecessarily
RQ_NOMERGE_FLAGS already clears defines which REQ flags aren't mergeable. There is no reason to specify it superflously. It only adds to confusion. Don't set REQ_NOMERGE for barriers and requests with specific queueing directive. REQ_NOMERGE is now exclusively used by the merging code. [ Impact: cleanup ] Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Родитель
a7f5579234
Коммит
e4025f6c21
|
@ -1082,16 +1082,13 @@ void init_request_from_bio(struct request *req, struct bio *bio)
|
||||||
if (bio_failfast_driver(bio))
|
if (bio_failfast_driver(bio))
|
||||||
req->cmd_flags |= REQ_FAILFAST_DRIVER;
|
req->cmd_flags |= REQ_FAILFAST_DRIVER;
|
||||||
|
|
||||||
/*
|
|
||||||
* REQ_BARRIER implies no merging, but lets make it explicit
|
|
||||||
*/
|
|
||||||
if (unlikely(bio_discard(bio))) {
|
if (unlikely(bio_discard(bio))) {
|
||||||
req->cmd_flags |= REQ_DISCARD;
|
req->cmd_flags |= REQ_DISCARD;
|
||||||
if (bio_barrier(bio))
|
if (bio_barrier(bio))
|
||||||
req->cmd_flags |= REQ_SOFTBARRIER;
|
req->cmd_flags |= REQ_SOFTBARRIER;
|
||||||
req->q->prepare_discard_fn(req->q, req);
|
req->q->prepare_discard_fn(req->q, req);
|
||||||
} else if (unlikely(bio_barrier(bio)))
|
} else if (unlikely(bio_barrier(bio)))
|
||||||
req->cmd_flags |= (REQ_HARDBARRIER | REQ_NOMERGE);
|
req->cmd_flags |= REQ_HARDBARRIER;
|
||||||
|
|
||||||
if (bio_sync(bio))
|
if (bio_sync(bio))
|
||||||
req->cmd_flags |= REQ_RW_SYNC;
|
req->cmd_flags |= REQ_RW_SYNC;
|
||||||
|
|
|
@ -51,7 +51,6 @@ void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk,
|
||||||
int where = at_head ? ELEVATOR_INSERT_FRONT : ELEVATOR_INSERT_BACK;
|
int where = at_head ? ELEVATOR_INSERT_FRONT : ELEVATOR_INSERT_BACK;
|
||||||
|
|
||||||
rq->rq_disk = bd_disk;
|
rq->rq_disk = bd_disk;
|
||||||
rq->cmd_flags |= REQ_NOMERGE;
|
|
||||||
rq->end_io = done;
|
rq->end_io = done;
|
||||||
WARN_ON(irqs_disabled());
|
WARN_ON(irqs_disabled());
|
||||||
spin_lock_irq(q->queue_lock);
|
spin_lock_irq(q->queue_lock);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче