Skip to contentSkip to conversation

blk-throttle: use queue_is_rq_based

PATCH Superseded weiping zhang 3 participants 3 messages Jan 19, 2018

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 blk-throttle: use queue_is_rq_based

use queue_is_rq_based instead of open code.

---
 block/blk-throttle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-throttle.c +1 -1
index 96ad326..457e985 100644
@@ -2456,7 +2456,7 @@ void blk_throtl_register_queue(struct request_queue *q)
 	td->throtl_slice = DFL_THROTL_SLICE_HD;
 #endif
 
-	td->track_bio_latency = !q->mq_ops && !q->request_fn;
+	td->track_bio_latency = !(queue_is_rq_based(q));
 	if (!td->track_bio_latency)
 		blk_stat_enable_accounting(q);
 }
Signature · 1 line
2.9.4
maintainer
#1 lore raw
Quoted 12 lines · weiping zhang

use queue_is_rq_based instead of open code.

---
 block/blk-throttle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-throttle.c +0 -0
index 96ad326..457e985 100644

block/blk-throttle.c void blk_throtl_register_queue(struct request_queue *q) · line 2459

Quoted 5 lines
block/blk-throttle.c +1 -1
@@ -2456,7 +2456,7 @@ void blk_throtl_register_queue(struct request_queue *q)
 	td->throtl_slice = DFL_THROTL_SLICE_HD;
 #endif
 
-	td->track_bio_latency = !q->mq_ops && !q->request_fn;
+	td->track_bio_latency = !(queue_is_rq_based(q));

Kill the extra parenthesis here.

Signature · 1 line
Jens Axboe
#2 lore raw

2018-01-20 3:58 GMT+08:00 Jens Axboe <[email protected]>:

Quoted 16 lines · weiping zhang
Quoted 15 lines

use queue_is_rq_based instead of open code.

---
 block/blk-throttle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-throttle.c +0 -0
index 96ad326..457e985 100644
@@ -2456,7 +2456,7 @@ void blk_throtl_register_queue(struct request_queue *q)
      td->throtl_slice = DFL_THROTL_SLICE_HD;
 #endif
 
Quoted 4 lines

block/blk-throttle.c void blk_throtl_register_queue(struct request_queue *q) · line 2459

Quoted 2 lines
block/blk-throttle.c +1 -1
-     td->track_bio_latency = !q->mq_ops && !q->request_fn;
+     td->track_bio_latency = !(queue_is_rq_based(q));

Kill the extra parenthesis here.

Oh, kill it at V2.

Quoted 3 lines

--
Jens Axboe