diff mbox series

blk-mq-debugfs: Also show requests that have not yet been started

Message ID 20181004173524.52712-1-bvanassche@acm.org (mailing list archive)
State New, archived
Headers show
Series blk-mq-debugfs: Also show requests that have not yet been started | expand

Commit Message

Bart Van Assche Oct. 4, 2018, 5:35 p.m. UTC
When debugging e.g. the SCSI timeout handler it is important that
requests that have not yet been started or that already have
completed are also reported through debugfs.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
---
 block/blk-mq-debugfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Hannes Reinecke Oct. 5, 2018, 5:48 a.m. UTC | #1
On 10/4/18 7:35 PM, Bart Van Assche wrote:
> When debugging e.g. the SCSI timeout handler it is important that
> requests that have not yet been started or that already have
> completed are also reported through debugfs.
> 
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Ming Lei <ming.lei@redhat.com>
> Cc: Hannes Reinecke <hare@suse.com>
> Cc: Johannes Thumshirn <jthumshirn@suse.de>
> Cc: Martin K. Petersen <martin.petersen@oracle.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 a5ea86835fcb..41b86f50d126 100644
> --- a/block/blk-mq-debugfs.c
> +++ b/block/blk-mq-debugfs.c
> @@ -431,8 +431,7 @@ static void hctx_show_busy_rq(struct request *rq, void *data, bool reserved)
>   {
>   	const struct show_busy_params *params = data;
>   
> -	if (blk_mq_map_queue(rq->q, rq->mq_ctx->cpu) == params->hctx &&
> -	    blk_mq_rq_state(rq) != MQ_RQ_IDLE)
> +	if (blk_mq_map_queue(rq->q, rq->mq_ctx->cpu) == params->hctx)
>   		__blk_mq_debugfs_rq_show(params->m,
>   					 list_entry_rq(&rq->queuelist));
>   }
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
Johannes Thumshirn Oct. 5, 2018, 7:06 a.m. UTC | #2
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Jens Axboe Oct. 5, 2018, 2:18 p.m. UTC | #3
On 10/4/18 11:35 AM, Bart Van Assche wrote:
> When debugging e.g. the SCSI timeout handler it is important that
> requests that have not yet been started or that already have
> completed are also reported through debugfs.

Thanks, I like this better - applied. BTW, what's up with the
reverse ordering on this:

> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Ming Lei <ming.lei@redhat.com>
> Cc: Hannes Reinecke <hare@suse.com>
> Cc: Johannes Thumshirn <jthumshirn@suse.de>
> Cc: Martin K. Petersen <martin.petersen@oracle.com>

For some reason that really annoys me, and I see it in various
patches these days. IMHO the SOB should be last, with whatever
acks, reviews, CC, before that.
Omar Sandoval Oct. 5, 2018, 10:37 p.m. UTC | #4
On Fri, Oct 05, 2018 at 08:18:00AM -0600, Jens Axboe wrote:
> On 10/4/18 11:35 AM, Bart Van Assche wrote:
> > When debugging e.g. the SCSI timeout handler it is important that
> > requests that have not yet been started or that already have
> > completed are also reported through debugfs.
> 
> Thanks, I like this better - applied. BTW, what's up with the
> reverse ordering on this:
> 
> > Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> > Cc: Christoph Hellwig <hch@lst.de>
> > Cc: Ming Lei <ming.lei@redhat.com>
> > Cc: Hannes Reinecke <hare@suse.com>
> > Cc: Johannes Thumshirn <jthumshirn@suse.de>
> > Cc: Martin K. Petersen <martin.petersen@oracle.com>
> 
> For some reason that really annoys me, and I see it in various
> patches these days. IMHO the SOB should be last, with whatever
> acks, reviews, CC, before that.

I could've sworn that this guideline was even documented somewhere, but
I can't find it now ¯\_(ツ)_/¯
Jens Axboe Oct. 6, 2018, 1:13 a.m. UTC | #5
On 10/5/18 4:37 PM, Omar Sandoval wrote:
> On Fri, Oct 05, 2018 at 08:18:00AM -0600, Jens Axboe wrote:
>> On 10/4/18 11:35 AM, Bart Van Assche wrote:
>>> When debugging e.g. the SCSI timeout handler it is important that
>>> requests that have not yet been started or that already have
>>> completed are also reported through debugfs.
>>
>> Thanks, I like this better - applied. BTW, what's up with the
>> reverse ordering on this:
>>
>>> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
>>> Cc: Christoph Hellwig <hch@lst.de>
>>> Cc: Ming Lei <ming.lei@redhat.com>
>>> Cc: Hannes Reinecke <hare@suse.com>
>>> Cc: Johannes Thumshirn <jthumshirn@suse.de>
>>> Cc: Martin K. Petersen <martin.petersen@oracle.com>
>>
>> For some reason that really annoys me, and I see it in various
>> patches these days. IMHO the SOB should be last, with whatever
>> acks, reviews, CC, before that.
> 
> I could've sworn that this guideline was even documented somewhere, but
> I can't find it now ¯\_(ツ)_/¯

My guess is that it's some newer git thing - but if it is, it's really
annoying and should be reverted. I end up fixing these up by hand.
Johannes Thumshirn Oct. 8, 2018, 9:15 a.m. UTC | #6
On Fri, Oct 05, 2018 at 07:13:32PM -0600, Jens Axboe wrote:
> On 10/5/18 4:37 PM, Omar Sandoval wrote:
> > On Fri, Oct 05, 2018 at 08:18:00AM -0600, Jens Axboe wrote:
> >> On 10/4/18 11:35 AM, Bart Van Assche wrote:
> >>> When debugging e.g. the SCSI timeout handler it is important that
> >>> requests that have not yet been started or that already have
> >>> completed are also reported through debugfs.
> >>
> >> Thanks, I like this better - applied. BTW, what's up with the
> >> reverse ordering on this:
> >>
> >>> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> >>> Cc: Christoph Hellwig <hch@lst.de>
> >>> Cc: Ming Lei <ming.lei@redhat.com>
> >>> Cc: Hannes Reinecke <hare@suse.com>
> >>> Cc: Johannes Thumshirn <jthumshirn@suse.de>
> >>> Cc: Martin K. Petersen <martin.petersen@oracle.com>
> >>
> >> For some reason that really annoys me, and I see it in various
> >> patches these days. IMHO the SOB should be last, with whatever
> >> acks, reviews, CC, before that.
> > 
> > I could've sworn that this guideline was even documented somewhere, but
> > I can't find it now ¯\_(ツ)_/¯
> 
> My guess is that it's some newer git thing - but if it is, it's really
> annoying and should be reverted. I end up fixing these up by hand.

Isn't it the way patchwork adds the tags? And yes I also thought this is the
correct way of adding the Ccs, etc..
diff mbox series

Patch

diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
index a5ea86835fcb..41b86f50d126 100644
--- a/block/blk-mq-debugfs.c
+++ b/block/blk-mq-debugfs.c
@@ -431,8 +431,7 @@  static void hctx_show_busy_rq(struct request *rq, void *data, bool reserved)
 {
 	const struct show_busy_params *params = data;
 
-	if (blk_mq_map_queue(rq->q, rq->mq_ctx->cpu) == params->hctx &&
-	    blk_mq_rq_state(rq) != MQ_RQ_IDLE)
+	if (blk_mq_map_queue(rq->q, rq->mq_ctx->cpu) == params->hctx)
 		__blk_mq_debugfs_rq_show(params->m,
 					 list_entry_rq(&rq->queuelist));
 }