From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJ5Py-0005ZK-0I for qemu-devel@nongnu.org; Tue, 23 Jun 2009 08:48:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJ5Pt-0005X6-AJ for qemu-devel@nongnu.org; Tue, 23 Jun 2009 08:48:05 -0400 Received: from [199.232.76.173] (port=45366 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJ5Ps-0005Wr-VN for qemu-devel@nongnu.org; Tue, 23 Jun 2009 08:48:01 -0400 Received: from mx2.redhat.com ([66.187.237.31]:42998) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJ5Ps-0007Ab-FU for qemu-devel@nongnu.org; Tue, 23 Jun 2009 08:48:00 -0400 Message-ID: <4A40CE36.9000109@redhat.com> Date: Tue, 23 Jun 2009 08:44:38 -0400 From: john cooper MIME-Version: 1.0 References: <4A3FCCEB.1080603@redhat.com> <4A3FD5E8.1060300@codemonkey.ws> In-Reply-To: <4A3FD5E8.1060300@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] Add serial number support for virtio_blk List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: john.cooper@redhat.com, qemu-devel@nongnu.org Anthony Liguori wrote: > > I'm trying to write a test case for this functionality. The first thing > I observed is that serial isn't included in info block. Could you add > it? This will let us figure out what the serial number ought to be so > that we can then verify it in the guest. Yes, it seems to be missing for all block devices. > So far, I don't see a wonderful way to verify a serial number in the > guest. Looks like the information can be gotten indirectly via hdparm > -i or by looking at /dev/disk/by-id. The later doesn't have an easy to > predict name though. > > Any thoughts? Initially I added a new ioctl in the guest driver to mine out the serial number. Admittedly it was a wart as both IDE and SCSI already had methods to accomplish the same. Emulating an IDE IDENTIFY command was the simplest alternative and allowed existing utilities such as 'hdparm -i /dev/vda' to retrieve the information, which is essentially what I had used to verify the functionality. -john -- john.cooper@redhat.com