From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=54698 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJn1o-0006GH-QD for qemu-devel@nongnu.org; Wed, 02 Jun 2010 08:26:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJn1j-0004v4-IY for qemu-devel@nongnu.org; Wed, 02 Jun 2010 08:26:36 -0400 Received: from e8.ny.us.ibm.com ([32.97.182.138]:38984) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJn1j-0004uo-F5 for qemu-devel@nongnu.org; Wed, 02 Jun 2010 08:26:31 -0400 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by e8.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id o52CFQOd017226 for ; Wed, 2 Jun 2010 08:15:26 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o52CQQDv1691758 for ; Wed, 2 Jun 2010 08:26:26 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o52CQQua023923 for ; Wed, 2 Jun 2010 09:26:26 -0300 Date: Wed, 2 Jun 2010 07:26:22 -0500 From: Ryan Harper Subject: Re: [Qemu-devel] Re: [PATCH] virtio-blk: assign a default serial number if none provided Message-ID: <20100602122622.GC19185@us.ibm.com> References: <20100602014854.GB16406@us.ibm.com> <20100602090050.GA19662@redhat.com> <20100602114546.GB19185@us.ibm.com> <20100602115430.GA29755@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100602115430.GA29755@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: john cooper , Ryan Harper , qemu-devel@nongnu.org * Michael S. Tsirkin [2010-06-02 06:59]: > On Wed, Jun 02, 2010 at 06:45:46AM -0500, Ryan Harper wrote: > > * Michael S. Tsirkin [2010-06-02 04:08]: > > > On Tue, Jun 01, 2010 at 08:48:54PM -0500, Ryan Harper wrote: > > > > This patch applies on-top of John's virtio-blk serial patches. > > > > > > > > Generate default serial numbers for virtio drives based on DriveInfo.unit which is > > > > incremented for each additional virtio-blk device. This provides a > > > > per-virtio-blk number to use in the default string: QM%05d that is used in > > > > hw/ide/core.c. The resulting serial number looks like: QM00001, etc. > > > > > > > > Signed-off-by: Ryan Harper > > > > > > > > > I think that there's a problem with this approach in that hot plug A, > > > hot plug B, hot unplug A is not the same as hot plug B. > > > So you might get guest boot failures and no easy way to > > > figure out why. For guests that need S/N, I think they > > > really must be persistent. > > > > That's true; though I think most boot drives boot via either LVM or UUID > > which will remain persistent. That said, if you are relying on the > > by-id; then of course the user will need to specify serial versus having > > one auto-generated. > > I guess the question then would be, if you don't rely on the S/N, why > do you want to set it? Functional similarity; we have default serial numbers for ide and scsi. scsi is hotpluggable and would suffer the same issue; and of course ide doesn't do hotplug. I don't think most folks will encounter the above scenario and that having the same default serial numbers being generated like we do ide and scsi is reasonable. -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh@us.ibm.com