Received: from eggs.gnu.org ([208.118.235.92]:40050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPWms-0006JU-PV for qemu-devel@nongnu.org; Wed, 02 May 2012 06:27:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPWmo-0002Fr-50 for qemu-devel@nongnu.org; Wed, 02 May 2012 06:27:58 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:58449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPWmn-0002Fh-Se for qemu-devel@nongnu.org; Wed, 02 May 2012 06:27:54 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 2 May 2012 11:27:51 +0100 Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q42ARlcR2764950 for ; Wed, 2 May 2012 11:27:47 +0100 Received: from d06av04.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q42ARkq6023527 for ; Wed, 2 May 2012 04:27:47 -0600 Message-ID: <4FA10C20.7050005@de.ibm.com> Date: Wed, 02 May 2012 12:27:44 +0200 From: Christian Borntraeger MIME-Version: 1.0 References: <1335448165-26174-1-git-send-email-borntraeger@de.ibm.com> <1335448165-26174-3-git-send-email-borntraeger@de.ibm.com> <4F9AC55D.3000904@redhat.com> In-Reply-To: <4F9AC55D.3000904@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/3] geometry detection: use HDIO_GETGEO List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Alexander Graf Cc: Cornelia Huck , Heinz Graalfs , Einar Lueck , qemu-devel , Jens Freimann On 27/04/12 18:12, Paolo Bonzini wrote: > Il 26/04/2012 15:49, Christian Borntraeger ha scritto: >> +#ifdef __linux__ >> + } else if (bdrv_ioctl(bs, HDIO_GETGEO, &geo) == 0) { >> + *pcyls = geo.cylinders; >> + *pheads = geo.heads; >> + *psecs = geo.sectors; >> + bdrv_set_geometry_hint(bs, *pcyls, *pheads, *psecs); >> +#endif > > Perhaps you could instead move guess_disk_lchs to target-specific code, > adding add this code to the s390-specific implementation and under > #ifdef __s390__. For x86 it doesn't make much sense, because a disk's > geometry most likely will be a wrong guess for the geometry that a guest > (for guests that care at all about geometries). Fine with me. We care about the geometry only for dasd devices, Even for FCP-based SCSI devices on s390 the geometry is not relevant. So moving that part to s390 specific code might make sense if nobody else needs that. Is that the case? Alex, would that be ok for you? Christian