[PATCH v3 3/3] nvmet: preserve controller serial number between reboots

Christoph Hellwig hch at lst.de
Fri Jul 14 05:56:12 PDT 2017


> +	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 at lst.de>



More information about the Linux-nvme mailing list