* [PATCH] blk-throttle: use queue_is_rq_based
@ 2018-01-19 17:40 weiping zhang
2018-01-19 19:58 ` Jens Axboe
0 siblings, 1 reply; 3+ messages in thread
From: weiping zhang @ 2018-01-19 17:40 UTC (permalink / raw)
To: axboe; +Cc: linux-block
use queue_is_rq_based instead of open code.
Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
---
block/blk-throttle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 96ad326..457e985 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -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);
}
--
2.9.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] blk-throttle: use queue_is_rq_based
2018-01-19 17:40 [PATCH] blk-throttle: use queue_is_rq_based weiping zhang
@ 2018-01-19 19:58 ` Jens Axboe
2018-01-19 23:35 ` weiping zhang
0 siblings, 1 reply; 3+ messages in thread
From: Jens Axboe @ 2018-01-19 19:58 UTC (permalink / raw)
To: linux-block
On 1/19/18 10:40 AM, weiping zhang wrote:
> use queue_is_rq_based instead of open code.
>
> Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
> ---
> block/blk-throttle.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block/blk-throttle.c b/block/blk-throttle.c
> index 96ad326..457e985 100644
> --- a/block/blk-throttle.c
> +++ b/block/blk-throttle.c
> @@ -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.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] blk-throttle: use queue_is_rq_based
2018-01-19 19:58 ` Jens Axboe
@ 2018-01-19 23:35 ` weiping zhang
0 siblings, 0 replies; 3+ messages in thread
From: weiping zhang @ 2018-01-19 23:35 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block
2018-01-20 3:58 GMT+08:00 Jens Axboe <axboe@kernel.dk>:
> On 1/19/18 10:40 AM, weiping zhang wrote:
>> use queue_is_rq_based instead of open code.
>>
>> Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
>> ---
>> block/blk-throttle.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/block/blk-throttle.c b/block/blk-throttle.c
>> index 96ad326..457e985 100644
>> --- a/block/blk-throttle.c
>> +++ b/block/blk-throttle.c
>> @@ -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.
Oh, kill it at V2.
> --
> Jens Axboe
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-19 23:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-19 17:40 [PATCH] blk-throttle: use queue_is_rq_based weiping zhang
2018-01-19 19:58 ` Jens Axboe
2018-01-19 23:35 ` weiping zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox