Commit 771949d03b4f5295f648f09141325fd478f6c7ce

Authored by Jens Axboe
1 parent 0eb8e88572

block: get rid of on-stack plugging debug checks

We don't need them anymore, so kill:

- REQ_ON_PLUG checks in various places
- !rq_mergeable() check in plug merging

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>

Showing 3 changed files with 0 additions and 33 deletions Side-by-side Diff

... ... @@ -569,8 +569,6 @@
569 569  
570 570 static inline void blk_free_request(struct request_queue *q, struct request *rq)
571 571 {
572   - BUG_ON(rq->cmd_flags & REQ_ON_PLUG);
573   -
574 572 if (rq->cmd_flags & REQ_ELVPRIV)
575 573 elv_put_request(q, rq);
576 574 mempool_free(rq, q->rq.rq_pool);
... ... @@ -1110,14 +1108,6 @@
1110 1108 {
1111 1109 const int ff = bio->bi_rw & REQ_FAILFAST_MASK;
1112 1110  
1113   - /*
1114   - * Debug stuff, kill later
1115   - */
1116   - if (!rq_mergeable(req)) {
1117   - blk_dump_rq_flags(req, "back");
1118   - return false;
1119   - }
1120   -
1121 1111 if (!ll_back_merge_fn(q, req, bio))
1122 1112 return false;
1123 1113  
... ... @@ -1141,14 +1131,6 @@
1141 1131 const int ff = bio->bi_rw & REQ_FAILFAST_MASK;
1142 1132 sector_t sector;
1143 1133  
1144   - /*
1145   - * Debug stuff, kill later
1146   - */
1147   - if (!rq_mergeable(req)) {
1148   - blk_dump_rq_flags(req, "front");
1149   - return false;
1150   - }
1151   -
1152 1134 if (!ll_front_merge_fn(q, req, bio))
1153 1135 return false;
1154 1136  
1155 1137  
... ... @@ -1258,14 +1240,12 @@
1258 1240  
1259 1241 el_ret = elv_merge(q, &req, bio);
1260 1242 if (el_ret == ELEVATOR_BACK_MERGE) {
1261   - BUG_ON(req->cmd_flags & REQ_ON_PLUG);
1262 1243 if (bio_attempt_back_merge(q, req, bio)) {
1263 1244 if (!attempt_back_merge(q, req))
1264 1245 elv_merged_request(q, req, el_ret);
1265 1246 goto out_unlock;
1266 1247 }
1267 1248 } else if (el_ret == ELEVATOR_FRONT_MERGE) {
1268   - BUG_ON(req->cmd_flags & REQ_ON_PLUG);
1269 1249 if (bio_attempt_front_merge(q, req, bio)) {
1270 1250 if (!attempt_front_merge(q, req))
1271 1251 elv_merged_request(q, req, el_ret);
... ... @@ -1320,10 +1300,6 @@
1320 1300 if (__rq->q != q)
1321 1301 plug->should_sort = 1;
1322 1302 }
1323   - /*
1324   - * Debug flag, kill later
1325   - */
1326   - req->cmd_flags |= REQ_ON_PLUG;
1327 1303 list_add_tail(&req->queuelist, &plug->list);
1328 1304 drive_stat_acct(req, 1);
1329 1305 } else {
... ... @@ -2749,7 +2725,6 @@
2749 2725 while (!list_empty(&list)) {
2750 2726 rq = list_entry_rq(list.next);
2751 2727 list_del_init(&rq->queuelist);
2752   - BUG_ON(!(rq->cmd_flags & REQ_ON_PLUG));
2753 2728 BUG_ON(!rq->q);
2754 2729 if (rq->q != q) {
2755 2730 /*
... ... @@ -2761,8 +2736,6 @@
2761 2736 depth = 0;
2762 2737 spin_lock(q->queue_lock);
2763 2738 }
2764   - rq->cmd_flags &= ~REQ_ON_PLUG;
2765   -
2766 2739 /*
2767 2740 * rq is already accounted, so use raw insert
2768 2741 */
... ... @@ -416,8 +416,6 @@
416 416 struct list_head *entry;
417 417 int stop_flags;
418 418  
419   - BUG_ON(rq->cmd_flags & REQ_ON_PLUG);
420   -
421 419 if (q->last_merge == rq)
422 420 q->last_merge = NULL;
423 421  
... ... @@ -655,8 +653,6 @@
655 653 trace_block_rq_insert(q, rq);
656 654  
657 655 rq->q = q;
658   -
659   - BUG_ON(rq->cmd_flags & REQ_ON_PLUG);
660 656  
661 657 if (rq->cmd_flags & REQ_SOFTBARRIER) {
662 658 /* barriers are scheduling boundary, update end_sector */
include/linux/blk_types.h
... ... @@ -151,7 +151,6 @@
151 151 __REQ_IO_STAT, /* account I/O stat */
152 152 __REQ_MIXED_MERGE, /* merge of different types, fail separately */
153 153 __REQ_SECURE, /* secure discard (used with __REQ_DISCARD) */
154   - __REQ_ON_PLUG, /* on plug list */
155 154 __REQ_NR_BITS, /* stops here */
156 155 };
157 156  
... ... @@ -192,7 +191,6 @@
192 191 #define REQ_IO_STAT (1 << __REQ_IO_STAT)
193 192 #define REQ_MIXED_MERGE (1 << __REQ_MIXED_MERGE)
194 193 #define REQ_SECURE (1 << __REQ_SECURE)
195   -#define REQ_ON_PLUG (1 << __REQ_ON_PLUG)
196 194  
197 195 #endif /* __LINUX_BLK_TYPES_H */