public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Johannes Thumshirn <jthumshirn@suse.de>
Cc: Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
	Keith Busch <keith.busch@intel.com>,
	Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
	Linux NVMe Mailinglist <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH v3 3/3] nvmet: preserve controller serial number between reboots
Date: Fri, 14 Jul 2017 14:56:12 +0200	[thread overview]
Message-ID: <20170714125612.GC27181@lst.de> (raw)
In-Reply-To: <20170714125329.18430-4-jthumshirn@suse.de>

> +	down_write(&nvmet_config_sem);
>  	subsys->ver = NVME_VS(1, 3, 0); /* NVMe 1.3.0 */
>  	/* generate a random serial number as our controllers are ephemeral: */
>  	get_random_bytes(&subsys->serial, sizeof(subsys->serial));
> +	up_write(&nvmet_config_sem);

no need for the lock here, the subsystems isn't visible at this point.

Otherwise:

Reviewed-by: Christoph Hellwig <hch@lst.de>

      reply	other threads:[~2017-07-14 12:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-14 12:53 [PATCH v3 0/3] Provide a stable serial number Johannes Thumshirn
2017-07-14 12:53 ` [PATCH v3 1/3] nvmet: prefix version configfs file with attr Johannes Thumshirn
2017-07-14 12:55   ` Christoph Hellwig
2017-07-14 13:41   ` Hannes Reinecke
2017-07-14 12:53 ` [PATCH v3 2/3] nvmet: Move serial number from controller to subsystem Johannes Thumshirn
2017-07-14 12:55   ` Christoph Hellwig
2017-07-14 12:53 ` [PATCH v3 3/3] nvmet: preserve controller serial number between reboots Johannes Thumshirn
2017-07-14 12:56   ` Christoph Hellwig [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=20170714125612.GC27181@lst.de \
    --to=hch@lst.de \
    --cc=jthumshirn@suse.de \
    --cc=keith.busch@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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