summaryrefslogtreecommitdiffstats
path: root/block/elevator.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-01-31 10:57:29 -0500
committerJens Axboe <axboe@fb.com>2017-01-31 16:00:34 -0500
commit57292b58ddb58689e8c3b4c6eadbef10d9ca44dd (patch)
treedd6e5af538b2f2684d2090781f668c7099a0455e /block/elevator.c
parent09fc54ccc42744669e748434af5c2f8adcad900f (diff)
block: introduce blk_rq_is_passthrough
This can be used to check for fs vs non-fs requests and basically removes all knowledge of BLOCK_PC specific from the block layer, as well as preparing for removing the cmd_type field in struct request. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/elevator.c')
-rw-r--r--block/elevator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/elevator.c b/block/elevator.c
index ef7f59469acc..dba9be891a6b 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -634,7 +634,7 @@ void __elv_add_request(struct request_queue *q, struct request *rq, int where)
634 634
635 if (rq->rq_flags & RQF_SOFTBARRIER) { 635 if (rq->rq_flags & RQF_SOFTBARRIER) {
636 /* barriers are scheduling boundary, update end_sector */ 636 /* barriers are scheduling boundary, update end_sector */
637 if (rq->cmd_type == REQ_TYPE_FS) { 637 if (!blk_rq_is_passthrough(rq)) {
638 q->end_sector = rq_end_sector(rq); 638 q->end_sector = rq_end_sector(rq);
639 q->boundary_rq = rq; 639 q->boundary_rq = rq;
640 } 640 }
@@ -676,7 +676,7 @@ void __elv_add_request(struct request_queue *q, struct request *rq, int where)
676 if (elv_attempt_insert_merge(q, rq)) 676 if (elv_attempt_insert_merge(q, rq))
677 break; 677 break;
678 case ELEVATOR_INSERT_SORT: 678 case ELEVATOR_INSERT_SORT:
679 BUG_ON(rq->cmd_type != REQ_TYPE_FS); 679 BUG_ON(blk_rq_is_passthrough(rq));
680 rq->rq_flags |= RQF_SORTED; 680 rq->rq_flags |= RQF_SORTED;
681 q->nr_sorted++; 681 q->nr_sorted++;
682 if (rq_mergeable(rq)) { 682 if (rq_mergeable(rq)) {