On Thu, Apr 27, 2017 at 08:54:34AM -0700, Bart Van Assche wrote: > When analyzing e.g. queue lockups it is important to know whether > or not a request has already been started. Hence also show the > atomic request flags.
Reviewed-by: Omar Sandoval <osan...@fb.com> > Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> > Cc: Omar Sandoval <osan...@fb.com> > Cc: Hannes Reinecke <h...@suse.com> > --- > block/blk-mq-debugfs.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c > index bcd2a7d4a3a5..9cb673bc7230 100644 > --- a/block/blk-mq-debugfs.c > +++ b/block/blk-mq-debugfs.c > @@ -308,6 +308,12 @@ static const char *const rqf_name[] = { > [ilog2((__force u32)RQF_SPECIAL_PAYLOAD)] = "SPECIAL_PAYLOAD", > }; > > +static const char *const rqaf_name[] = { > + [REQ_ATOM_COMPLETE] = "COMPLETE", > + [REQ_ATOM_STARTED] = "STARTED", > + [REQ_ATOM_POLL_SLEPT] = "POLL_SLEPT", > +}; > + > static int blk_mq_debugfs_rq_show(struct seq_file *m, void *v) > { > struct request *rq = list_entry_rq(v); > @@ -325,6 +331,8 @@ static int blk_mq_debugfs_rq_show(struct seq_file *m, > void *v) > seq_puts(m, ", .rq_flags="); > blk_flags_show(m, (__force unsigned int)rq->rq_flags, rqf_name, > ARRAY_SIZE(rqf_name)); > + seq_puts(m, ", .atomic_flags="); > + blk_flags_show(m, rq->atomic_flags, rqaf_name, ARRAY_SIZE(rqaf_name)); > seq_printf(m, ", .tag=%d, .internal_tag=%d", rq->tag, > rq->internal_tag); > if (mq_ops->show_rq) > -- > 2.12.2 >