From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MBnXq-00065T-BX for qemu-devel@nongnu.org; Wed, 03 Jun 2009 06:18:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MBnXp-000653-BK for qemu-devel@nongnu.org; Wed, 03 Jun 2009 06:18:05 -0400 Received: from [199.232.76.173] (port=57699 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MBnXp-00064z-3s for qemu-devel@nongnu.org; Wed, 03 Jun 2009 06:18:05 -0400 Received: from brick.kernel.dk ([93.163.65.50]:40217 helo=kernel.dk) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MBnXn-00028Z-K6 for qemu-devel@nongnu.org; Wed, 03 Jun 2009 06:18:04 -0400 Date: Wed, 3 Jun 2009 12:17:58 +0200 From: Jens Axboe Message-ID: <20090603101758.GK11363@kernel.dk> References: <4A1F615F.1090701@redhat.com> <200906011640.02632.rusty@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200906011640.02632.rusty@rustcorp.com.au> Subject: [Qemu-devel] Re: [PATCH 2/2] Add serial number support for virtio_blk, V4 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Rusty Russell Cc: john cooper , qemu-devel@nongnu.org, KVM list , Christoph Hellwig On Mon, Jun 01 2009, Rusty Russell wrote: > On Fri, 29 May 2009 01:45:27 pm john cooper wrote: > > virtio_blk-serial-4.patch > > Hate to ask dumb questions, but is there a scsi equivalent of this? It'd be > nice if we could avoid being ATA-specific in the long run... SCSI has mode pages, where ATA pretty much stuffs everything into the identify data. > Also, why u16? The identify page is word based, so u16 makes sense. > > Thanks, > Rusty. > > > +/* return ATA identify data > > + */ > > +static int virtblk_identify(struct gendisk *disk, void *argp) > > +{ > > + struct virtio_blk *vblk = disk->private_data; > > + u16 *id; > > + int err = -ENOMEM; > > + > > + id = kmalloc(VIRTIO_BLK_ID_BYTES, GFP_KERNEL); > > + if (!id) > > + goto out; > > + > > + err = virtio_config_buf(vblk->vdev, VIRTIO_BLK_F_IDENTIFY, > > + offsetof(struct virtio_blk_config, identify), id, > > + VIRTIO_BLK_ID_BYTES); > -- Jens Axboe