Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752520AbdGMPI3 (ORCPT ); Thu, 13 Jul 2017 11:08:29 -0400 Received: from mx2.suse.de ([195.135.220.15]:46470 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751267AbdGMPI1 (ORCPT ); Thu, 13 Jul 2017 11:08:27 -0400 Message-ID: <1499958505.6432.8.camel@suse.de> Subject: Re: [PATCH] nvmet: preserve controller serial number between reboots From: Martin Wilck To: Johannes Thumshirn , Christoph Hellwig , Sagi Grimberg , Keith Busch Cc: Linux Kernel Mailinglist , Linux NVMe Mailinglist Date: Thu, 13 Jul 2017 17:08:25 +0200 In-Reply-To: <20170713104806.12353-1-jthumshirn@suse.de> References: <20170713104806.12353-1-jthumshirn@suse.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.24.3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 591 Lines: 14 On Thu, 2017-07-13 at 12:48 +0200, Johannes Thumshirn wrote: > The NVMe target has no way to preserve controller serial > IDs across reboots which breaks udev scripts doing > SYMLINK+="dev/disk/by-id/nvme-$env{ID_SERIAL}-part%n. > > Export the randomly generated serial number via configfs and allow > setting of a serial via configfs to mitigate this breakage. I'm wondering if this should be a write-once attribute. Also, Once the serial number has been passed on to some host (or maybe only: while the device is in use by some host), the attribute should probably be read-only. Martin