Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: bvanassche@acm.org (Bart Van Assche)
Subject: [PATCH V2 1/3] nvme: introduce nvme-ctrl state name string array
Date: Mon, 29 Apr 2019 16:27:04 -0700	[thread overview]
Message-ID: <1556580424.161891.170.camel@acm.org> (raw)
In-Reply-To: <SN6PR04MB452783333EA5F5FE1190294886390@SN6PR04MB4527.namprd04.prod.outlook.com>

On Mon, 2019-04-29@22:12 +0000, Chaitanya Kulkarni wrote:
> On 04/29/2019 10:41 AM, Heitke, Kenneth wrote:
> > 
> > 
> > On 4/28/2019 9:24 PM, Chaitanya Kulkarni wrote:
> > > From: Hannes Reinecke <hare at suse.com>
> > > 
> > > This patch intoduces nvme-ctrl state name array which is used inthe the
> > 
> > s/intoduces /introduces/
> > s/inthe/in the/
> > 
> > > later patch to improve the logging of the ctrl state.
> > > 
> > > Signed-off-by: Hannes Reinecke <hare at suse.com>
> > > Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
> > > ---
> > >    drivers/nvme/host/nvme.h | 10 ++++++++++
> > >    1 file changed, 10 insertions(+)
> > > 
> > > diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
> > > index 527d64545023..01a36bbafed6 100644
> > > --- a/drivers/nvme/host/nvme.h
> > > +++ b/drivers/nvme/host/nvme.h
> > > @@ -146,6 +146,16 @@ enum nvme_ctrl_state {
> > >    	NVME_CTRL_DEAD,
> > >    };
> > > 
> > > +static const char *const nvme_ctrl_state_name[] = {
> > > +	[NVME_CTRL_NEW]         = "new",
> > > +	[NVME_CTRL_LIVE]        = "live",
> > > +	[NVME_CTRL_ADMIN_ONLY]  = "only-admin",
> > > +	[NVME_CTRL_RESETTING]   = "resetting",
> > > +	[NVME_CTRL_CONNECTING]  = "connecting",
> > > +	[NVME_CTRL_DELETING]    = "deleting",
> > > +	[NVME_CTRL_DEAD]        = "dead",
> > > +};
> > 
> > I haven't been paying attention if this was bought up before but won't
> > this create multiple copies of this data for every source file the
> > includes the header file?
> 
> Yes, we did discuss this.

Hi Chaitanya,

In an e-mail from Christoph I found the following recommendation with regard
to the nvme_ctrl_state_name[] array: "Just keep it near the top of multipath.c."
and you replied "Okay, that works too."

Did I perhaps miss something?

Thanks,

Bart.

  reply	other threads:[~2019-04-29 23:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29  3:24 [PATCH 0/3] nvme: improve logging Chaitanya Kulkarni
2019-04-29  3:24 ` [PATCH V2 1/3] nvme: introduce nvme-ctrl state name string array Chaitanya Kulkarni
2019-04-29 17:40   ` Heitke, Kenneth
2019-04-29 22:12     ` Chaitanya Kulkarni
2019-04-29 23:27       ` Bart Van Assche [this message]
2019-04-29 23:29         ` Sagi Grimberg
2019-04-30  3:18           ` Chaitanya Kulkarni
2019-04-29  3:24 ` [PATCH V2 2/3] nvme: improve logging Chaitanya Kulkarni
2019-04-29 23:18   ` Sagi Grimberg
2019-04-29  3:24 ` [PATCH V2 3/3] nvme-multipath: " Chaitanya Kulkarni
2019-04-29 23:20   ` Sagi Grimberg
2019-04-30 15:33   ` Christoph Hellwig

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=1556580424.161891.170.camel@acm.org \
    --to=bvanassche@acm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox