From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF41E-0007km-1y for qemu-devel@nongnu.org; Fri, 21 Sep 2012 10:15:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TF417-00025i-7D for qemu-devel@nongnu.org; Fri, 21 Sep 2012 10:15:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF416-00025Y-VU for qemu-devel@nongnu.org; Fri, 21 Sep 2012 10:15:41 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8LEFdOq005123 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 21 Sep 2012 10:15:39 -0400 Message-ID: <505C768A.5070801@redhat.com> Date: Fri, 21 Sep 2012 08:15:38 -0600 From: Eric Blake MIME-Version: 1.0 References: <20120921133031.GA1682@darkstar.nay.redhat.com> In-Reply-To: <20120921133031.GA1682@darkstar.nay.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig572B86079C9353C0FC738B49" Subject: Re: [Qemu-devel] [PATCH v2] virtio-blk: add default serial id List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dave Young Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig572B86079C9353C0FC738B49 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 09/21/2012 07:30 AM, Dave Young wrote: >=20 > For virtio block device, if user does not specify the serial attribute,= > There will be no serial availabe, this is not convenient for identifyin= g > the disk. >=20 > Doing something similar to ide disks, add a "VD0000?" default serial > number if user does not specify it. >=20 > [v1->v2 address comments from Eric Blake]: > fix spell errors in patch description > decrease drive_serial in virtio_blk_exit as well Typically, patch changelogs belong... >=20 > Signed-off-by: Dave Young > --- =2E..after the --- line, so that 'git am' doesn't make them part of git history. Also, I'm not sure that decreasing the serial number is correct - you've now made it much easier to get duplicate serial numbers compared to my original complaint of 100000 hotplug cycles. Now all I have to do is: create a guest with two disks hot unplug disk one hot plug a new disk and voila, both disks will now have serial number 2. > @@ -632,6 +638,7 @@ VirtIODevice *virtio_blk_init(DeviceStat > sizeof(struct virtio_blk_con= fig), > sizeof(VirtIOBlock)); > =20 > + s->drive_serial =3D drive_serial++; > s->vdev.get_config =3D virtio_blk_update_config; > s->vdev.set_config =3D virtio_blk_set_config; > s->vdev.get_features =3D virtio_blk_get_features; > @@ -664,4 +671,5 @@ void virtio_blk_exit(VirtIODevice *vdev) > unregister_savevm(s->qdev, "virtio-blk", s); > blockdev_mark_auto_del(s->bs); > virtio_cleanup(vdev); > + drive_serial--; > } >=20 >=20 --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig572B86079C9353C0FC738B49 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQEcBAEBCAAGBQJQXHaKAAoJEKeha0olJ0Nqr7cIAIOtk/DnfDdm0gJdGQDI7/Gi VTQaD7g7JNHVoVolpxZoaQMGf3nInK8Ola0RLOOWV3wTbuDWIZhUGLa6VFZ4/8Im yOH36LVzwWuvcPMCLB8O4kDnavMcy6r/moI1E1nnPuraljBXZQExmTCctlLgYwWa KL/hj8Jr+nH8lZQExbK32GkjxHmSwMTFjSUKMRjwPa0VhhEhRzPSbubmoacvlSI6 pMDsMDNUeFq1ysX2piquSH8GO4LX1ymbKDHnFWi6wl6gDGHdn09pvORIvvo/V80e rekvSZ9vaxdtnVp3uu60PLLlH8p5zildpprTJlWCZen8vQeQv5Gsmo4pZE3xVkE= =H6Cg -----END PGP SIGNATURE----- --------------enig572B86079C9353C0FC738B49--