All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
To: Bart Van Assche <bvanassche@acm.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Cc: "hch@lst.de" <hch@lst.de>, "hare@suse.com" <hare@suse.com>
Subject: Re: [PATCH 2/2] block: add more debug data to print_req_err
Date: Wed, 12 Jun 2019 16:19:07 +0000	[thread overview]
Message-ID: <DM6PR04MB57545CCD2B1BA077CA0E36F986EC0@DM6PR04MB5754.namprd04.prod.outlook.com> (raw)
In-Reply-To: 3ab93dfa-523a-c5e8-05fc-2c974fc8778e@acm.org

Thanks for for the review, I'll send out the V2.

On 6/12/19 8:22 AM, Bart Van Assche wrote:
> On 6/11/19 1:02 PM, Chaitanya Kulkarni wrote:
>> +static inline const char *req_op_str(struct request *req)
>> +{
>> +       char *ret;
>> +
>> +       switch (req_op(req)) {
>> +       case REQ_OP_READ:
>> +               ret = "read";
>> +               break;
>> +       case REQ_OP_WRITE:
>> +               ret = "write";
>> +               break;
>> +       case REQ_OP_FLUSH:
>> +               ret = "flush";
>> +               break;
>> +       case REQ_OP_DISCARD:
>> +               ret = "discard";
>> +               break;
>> +       case REQ_OP_SECURE_ERASE:
>> +               ret = "secure_erase";
>> +               break;
>> +       case REQ_OP_ZONE_RESET:
>> +               ret = "zone_reset";
>> +               break;
>> +       case REQ_OP_WRITE_SAME:
>> +               ret = "write_same";
>> +               break;
>> +       case REQ_OP_WRITE_ZEROES:
>> +               ret = "write_zeroes";
>> +               break;
>> +       case REQ_OP_SCSI_IN:
>> +               ret = "scsi_in";
>> +               break;
>> +       case REQ_OP_SCSI_OUT:
>> +               ret = "scsi_out";
>> +               break;
>> +       case REQ_OP_DRV_IN:
>> +               ret = "drv_in";
>> +               break;
>> +       case REQ_OP_DRV_OUT:
>> +               ret = "drv_out";
>> +               break;
>> +       default:
>> +               ret = "unknown";
>> +       }
>> +
>> +       return ret;
>> +}
> Please use an array instead of a switch/case statement to do this 
> conversion. See also blk-mq-debugfs.c for examples.
>
> Please also make show_bio_op(op) in include/trace/events/f2fs.h call the 
> above function.
>
> Thanks,
>
> Bart.
>


      reply	other threads:[~2019-06-12 16:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11 20:02 [PATCH 0/2] block: improve print_req_error() Chaitanya Kulkarni
2019-06-11 20:02 ` [PATCH 1/2] block: improve print_req_error Chaitanya Kulkarni
2019-06-17  8:42   ` Hannes Reinecke
2019-06-17 16:49     ` Chaitanya Kulkarni
2019-06-18 11:09       ` Hannes Reinecke
2019-06-11 20:02 ` [PATCH 2/2] block: add more debug data to print_req_err Chaitanya Kulkarni
2019-06-12 15:21   ` Bart Van Assche
2019-06-12 16:19     ` Chaitanya Kulkarni [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR04MB57545CCD2B1BA077CA0E36F986EC0@DM6PR04MB5754.namprd04.prod.outlook.com \
    --to=chaitanya.kulkarni@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.