diff mbox series

[1/1] blk-mq: remove the pointless call of list_entry_rq() in hctx_show_busy_rq()

Message ID 20200427131250.13725-1-houtao1@huawei.com (mailing list archive)
State New, archived
Headers show
Series [1/1] blk-mq: remove the pointless call of list_entry_rq() in hctx_show_busy_rq() | expand

Commit Message

Hou Tao April 27, 2020, 1:12 p.m. UTC
And use rq directly.

Signed-off-by: Hou Tao <houtao1@huawei.com>
---
 block/blk-mq-debugfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Bart Van Assche April 27, 2020, 5:27 p.m. UTC | #1
On 2020-04-27 06:12, Hou Tao wrote:
> And use rq directly.
> 
> Signed-off-by: Hou Tao <houtao1@huawei.com>
> ---
>  block/blk-mq-debugfs.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
> index b3f2ba483992..7a79db81a63f 100644
> --- a/block/blk-mq-debugfs.c
> +++ b/block/blk-mq-debugfs.c
> @@ -400,8 +400,7 @@ static bool hctx_show_busy_rq(struct request *rq, void *data, bool reserved)
>  	const struct show_busy_params *params = data;
>  
>  	if (rq->mq_hctx == params->hctx)
> -		__blk_mq_debugfs_rq_show(params->m,
> -					 list_entry_rq(&rq->queuelist));
> +		__blk_mq_debugfs_rq_show(params->m, rq);
>  
>  	return true;
>  }

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Hou Tao May 25, 2020, 6:32 a.m. UTC | #2
ping ?

On 2020/4/28 1:27, Bart Van Assche wrote:
> On 2020-04-27 06:12, Hou Tao wrote:
>> And use rq directly.
>>
>> Signed-off-by: Hou Tao <houtao1@huawei.com>
>> ---
>>  block/blk-mq-debugfs.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
>> index b3f2ba483992..7a79db81a63f 100644
>> --- a/block/blk-mq-debugfs.c
>> +++ b/block/blk-mq-debugfs.c
>> @@ -400,8 +400,7 @@ static bool hctx_show_busy_rq(struct request *rq, void *data, bool reserved)
>>  	const struct show_busy_params *params = data;
>>  
>>  	if (rq->mq_hctx == params->hctx)
>> -		__blk_mq_debugfs_rq_show(params->m,
>> -					 list_entry_rq(&rq->queuelist));
>> +		__blk_mq_debugfs_rq_show(params->m, rq);
>>  
>>  	return true;
>>  }
> 
> Reviewed-by: Bart Van Assche <bvanassche@acm.org>
> 
>
Hou Tao July 1, 2020, 1:24 a.m. UTC | #3
ping ?

On 2020/5/25 14:32, Hou Tao wrote:
> ping ?
> 
> On 2020/4/28 1:27, Bart Van Assche wrote:
>> On 2020-04-27 06:12, Hou Tao wrote:
>>> And use rq directly.
>>>
>>> Signed-off-by: Hou Tao <houtao1@huawei.com>
>>> ---
>>>  block/blk-mq-debugfs.c | 3 +--
>>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
>>> index b3f2ba483992..7a79db81a63f 100644
>>> --- a/block/blk-mq-debugfs.c
>>> +++ b/block/blk-mq-debugfs.c
>>> @@ -400,8 +400,7 @@ static bool hctx_show_busy_rq(struct request *rq, void *data, bool reserved)
>>>  	const struct show_busy_params *params = data;
>>>  
>>>  	if (rq->mq_hctx == params->hctx)
>>> -		__blk_mq_debugfs_rq_show(params->m,
>>> -					 list_entry_rq(&rq->queuelist));
>>> +		__blk_mq_debugfs_rq_show(params->m, rq);
>>>  
>>>  	return true;
>>>  }
>>
>> Reviewed-by: Bart Van Assche <bvanassche@acm.org>
>>
>>
> 
> 
>
Ming Lei July 1, 2020, 4 a.m. UTC | #4
On Mon, Apr 27, 2020 at 8:44 PM Hou Tao <houtao1@huawei.com> wrote:
>
> And use rq directly.
>
> Signed-off-by: Hou Tao <houtao1@huawei.com>
> ---
>  block/blk-mq-debugfs.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
> index b3f2ba483992..7a79db81a63f 100644
> --- a/block/blk-mq-debugfs.c
> +++ b/block/blk-mq-debugfs.c
> @@ -400,8 +400,7 @@ static bool hctx_show_busy_rq(struct request *rq, void *data, bool reserved)
>         const struct show_busy_params *params = data;
>
>         if (rq->mq_hctx == params->hctx)
> -               __blk_mq_debugfs_rq_show(params->m,
> -                                        list_entry_rq(&rq->queuelist));
> +               __blk_mq_debugfs_rq_show(params->m, rq);

Reviewed-by: Ming Lei <ming.lei@redhat.com>
Jens Axboe July 1, 2020, 1:26 p.m. UTC | #5
On 4/27/20 7:12 AM, Hou Tao wrote:
> And use rq directly.

I re-wrote your commit message a bit - but otherwise, thanks, applied.
diff mbox series

Patch

diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
index b3f2ba483992..7a79db81a63f 100644
--- a/block/blk-mq-debugfs.c
+++ b/block/blk-mq-debugfs.c
@@ -400,8 +400,7 @@  static bool hctx_show_busy_rq(struct request *rq, void *data, bool reserved)
 	const struct show_busy_params *params = data;
 
 	if (rq->mq_hctx == params->hctx)
-		__blk_mq_debugfs_rq_show(params->m,
-					 list_entry_rq(&rq->queuelist));
+		__blk_mq_debugfs_rq_show(params->m, rq);
 
 	return true;
 }