From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: [PATCH 2/2] Add serial number support for virtio_blk, V4 Date: Mon, 1 Jun 2009 16:40:01 +0930 Message-ID: <200906011640.02632.rusty@rustcorp.com.au> References: <4A1F615F.1090701@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: KVM list , qemu-devel@nongnu.org, Christoph Hellwig , Jens Axboe To: john cooper Return-path: Received: from ozlabs.org ([203.10.76.45]:47345 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752187AbZFAHKF (ORCPT ); Mon, 1 Jun 2009 03:10:05 -0400 In-Reply-To: <4A1F615F.1090701@redhat.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: 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... Also, why u16? 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);