From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xr3be-0002JM-Ec for qemu-devel@nongnu.org; Wed, 19 Nov 2014 06:39:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xr3bW-0007HM-Po for qemu-devel@nongnu.org; Wed, 19 Nov 2014 06:39:30 -0500 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:33612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xr3bW-0007GP-G6 for qemu-devel@nongnu.org; Wed, 19 Nov 2014 06:39:22 -0500 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 19 Nov 2014 11:39:18 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 04F6F1B0806B for ; Wed, 19 Nov 2014 11:39:27 +0000 (GMT) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sAJBdFYv5767472 for ; Wed, 19 Nov 2014 11:39:15 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sAJBdEbW027611 for ; Wed, 19 Nov 2014 04:39:14 -0700 Message-ID: <546C8161.10100@de.ibm.com> Date: Wed, 19 Nov 2014 12:39:13 +0100 From: Christian Borntraeger MIME-Version: 1.0 References: <1416392276-10408-1-git-send-email-tumanova@linux.vnet.ibm.com> In-Reply-To: <1416392276-10408-1-git-send-email-tumanova@linux.vnet.ibm.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 0/6] Geometry and blocksize support for backing devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ekaterina Tumanova , Public KVM Mailing List Cc: kwolf@redhat.com, armbru@redhat.com, mihajlov@linux.vnet.ibm.com, dahi@linux.vnet.ibm.com, stefanha@redhat.com, cornelia.huck@de.ibm.com, pbonzini@redhat.com Am 19.11.2014 um 11:17 schrieb Ekaterina Tumanova: > Hi folks, > > I'm sorry for the recent spam. I messed up during code submission last time. > So please ignore any previous notes you received from me and answer only to > this thread. > > This is the rework of the geometry+blocksize patch, which was > recently discussed here: > http://lists.gnu.org/archive/html/qemu-devel/2014-11/msg01148.html > > Markus suggested that we only detect blocksize and geometry for DASDs. > > According to this agreement new version contains DASD special casing. > The driver methods are implemented only for "host_device" and inner hdev_xxx > functions check if the backing storage is a DASD by means of > BIODASDINFO2 ioctl. > > Original patchset can be found here: > http://lists.gnu.org/archive/html/qemu-devel/2014-07/msg03791.html > > Ekaterina Tumanova (6): > geometry: add bdrv functions for geometry and blocksize > geometry: Detect blocksize via ioctls in separate static functions > geometry: Add driver methods to probe blocksizes and geometry > geometry: Add block-backend wrappers for geometry probing > geometry: Call backend function to detect geometry and blocksize > geometry: Target specific hook for s390x in geometry guessing > > block.c | 26 +++++++++ > block/block-backend.c | 10 ++++ > block/raw-posix.c | 123 ++++++++++++++++++++++++++++++++++------- > block/raw_bsd.c | 12 ++++ > hw/block/Makefile.objs | 6 +- > hw/block/block.c | 11 ++++ > hw/block/hd-geometry.c | 43 ++++++++++++-- > hw/block/virtio-blk.c | 1 + > include/block/block.h | 20 +++++++ > include/block/block_int.h | 3 + > include/hw/block/block.h | 1 + > include/sysemu/block-backend.h | 2 + > 12 files changed, 234 insertions(+), 24 deletions(-) > I can confirm that it makes dasd devices on s390 work (partition detection is fine, so geometry/sector size must be as well) This patch set needs to be fixed for i386, though: /home/cborntra/REPOS/qemu/hw/block/hd-geometry.c: In function 'hd_geometry_guess': /home/cborntra/REPOS/qemu/hw/block/hd-geometry.c:159:5: error: pointer targets in passing argument 2 of 'guess_disk_lchs' differ in signedness [-Werror=pointer-sign] if (guess_disk_lchs(blk, &cylinders, &heads, &secs) < 0) { ^ /home/cborntra/REPOS/qemu/hw/block/hd-geometry.c:52:12: note: expected 'uint32_t *' but argument is of type 'int *' static int guess_disk_lchs(BlockBackend *blk, uint32_t *pcylinders,