diff mbox series

[16/28] blk-cgroup: remove legacy queue bypassing

Message ID 20181025211039.11559-17-axboe@kernel.dk (mailing list archive)
State New, archived
Headers show
Series blk-mq driver conversions and legacy path removal | expand

Commit Message

Jens Axboe Oct. 25, 2018, 9:10 p.m. UTC
We only support mq devices now.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
 block/blk-cgroup.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Hannes Reinecke Oct. 29, 2018, 7 a.m. UTC | #1
On 10/25/18 11:10 PM, Jens Axboe wrote:
> We only support mq devices now.
> 
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
> ---
>   block/blk-cgroup.c | 8 --------
>   1 file changed, 8 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
Johannes Thumshirn Oct. 29, 2018, 11 a.m. UTC | #2
Hi Jens,

On 25/10/18 23:10, Jens Axboe wrote:
[...]
> @@ -1487,8 +1485,6 @@ int blkcg_activate_policy(struct request_queue *q,
>  out_bypass_end:
>  	if (q->mq_ops)
>  		blk_mq_unfreeze_queue(q);
> -	else
> -		blk_queue_bypass_end(q);

>  
> 

Now that we only have mq, do we still need all these checks for q->mq_ops?
Jens Axboe Oct. 29, 2018, 2:23 p.m. UTC | #3
On 10/29/18 5:00 AM, Johannes Thumshirn wrote:
> Hi Jens,
> 
> On 25/10/18 23:10, Jens Axboe wrote:
> [...]
>> @@ -1487,8 +1485,6 @@ int blkcg_activate_policy(struct request_queue *q,
>>  out_bypass_end:
>>  	if (q->mq_ops)
>>  		blk_mq_unfreeze_queue(q);
>> -	else
>> -		blk_queue_bypass_end(q);
> 
>>  
>>
> 
> Now that we only have mq, do we still need all these checks for q->mq_ops?

We need it for the cases where we can be passing in a stacked driver
or an mq driver, or for cases where we explicitly register mq attributes,
and that sort of thing.
Johannes Thumshirn Oct. 29, 2018, 2:25 p.m. UTC | #4
On 29/10/18 15:23, Jens Axboe wrote:
> On 10/29/18 5:00 AM, Johannes Thumshirn wrote:
>> Hi Jens,
>>
>> On 25/10/18 23:10, Jens Axboe wrote:
>> [...]
>>> @@ -1487,8 +1485,6 @@ int blkcg_activate_policy(struct request_queue *q,
>>>  out_bypass_end:
>>>  	if (q->mq_ops)
>>>  		blk_mq_unfreeze_queue(q);
>>> -	else
>>> -		blk_queue_bypass_end(q);
>>
>>>  
>>>
>>
>> Now that we only have mq, do we still need all these checks for q->mq_ops?
> 
> We need it for the cases where we can be passing in a stacked driver
> or an mq driver, or for cases where we explicitly register mq attributes,
> and that sort of thing.
> 

Ah ok. Guess we'll have to live with it then.

	Johannes
Jens Axboe Oct. 29, 2018, 2:59 p.m. UTC | #5
On 10/29/18 8:25 AM, Johannes Thumshirn wrote:
> On 29/10/18 15:23, Jens Axboe wrote:
>> On 10/29/18 5:00 AM, Johannes Thumshirn wrote:
>>> Hi Jens,
>>>
>>> On 25/10/18 23:10, Jens Axboe wrote:
>>> [...]
>>>> @@ -1487,8 +1485,6 @@ int blkcg_activate_policy(struct request_queue *q,
>>>>  out_bypass_end:
>>>>  	if (q->mq_ops)
>>>>  		blk_mq_unfreeze_queue(q);
>>>> -	else
>>>> -		blk_queue_bypass_end(q);
>>>
>>>>  
>>>>
>>>
>>> Now that we only have mq, do we still need all these checks for q->mq_ops?
>>
>> We need it for the cases where we can be passing in a stacked driver
>> or an mq driver, or for cases where we explicitly register mq attributes,
>> and that sort of thing.
>>
> 
> Ah ok. Guess we'll have to live with it then.

At this point the check should be equivalent to queue_is_rq_based(), fwiw.
diff mbox series

Patch

diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 992da5592c6e..5f10d755ec52 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -1446,8 +1446,6 @@  int blkcg_activate_policy(struct request_queue *q,
 
 	if (q->mq_ops)
 		blk_mq_freeze_queue(q);
-	else
-		blk_queue_bypass_start(q);
 pd_prealloc:
 	if (!pd_prealloc) {
 		pd_prealloc = pol->pd_alloc_fn(GFP_KERNEL, q->node);
@@ -1487,8 +1485,6 @@  int blkcg_activate_policy(struct request_queue *q,
 out_bypass_end:
 	if (q->mq_ops)
 		blk_mq_unfreeze_queue(q);
-	else
-		blk_queue_bypass_end(q);
 	if (pd_prealloc)
 		pol->pd_free_fn(pd_prealloc);
 	return ret;
@@ -1513,8 +1509,6 @@  void blkcg_deactivate_policy(struct request_queue *q,
 
 	if (q->mq_ops)
 		blk_mq_freeze_queue(q);
-	else
-		blk_queue_bypass_start(q);
 
 	spin_lock_irq(q->queue_lock);
 
@@ -1533,8 +1527,6 @@  void blkcg_deactivate_policy(struct request_queue *q,
 
 	if (q->mq_ops)
 		blk_mq_unfreeze_queue(q);
-	else
-		blk_queue_bypass_end(q);
 }
 EXPORT_SYMBOL_GPL(blkcg_deactivate_policy);