From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPaXQ-0005wk-4o for qemu-devel@nongnu.org; Wed, 02 May 2012 10:28:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPaXH-0000r2-HF for qemu-devel@nongnu.org; Wed, 02 May 2012 10:28:15 -0400 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:36010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPaXH-0000qp-8N for qemu-devel@nongnu.org; Wed, 02 May 2012 10:28:07 -0400 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 2 May 2012 15:28:04 +0100 Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q42ES2ar2445450 for ; Wed, 2 May 2012 15:28:02 +0100 Received: from d06av09.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q42ES1f9002830 for ; Wed, 2 May 2012 08:28:02 -0600 Message-ID: <4FA1446C.6020904@de.ibm.com> Date: Wed, 02 May 2012 16:27:56 +0200 From: Christian Borntraeger MIME-Version: 1.0 References: <1ec34b9b-f63c-4d11-ab0b-4a8a48920561@zmail13.collab.prod.int.phx2.redhat.com> <4FA12E6E.9040004@suse.de> In-Reply-To: <4FA12E6E.9040004@suse.de> Content-Type: text/plain; charset=UTF-8 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: Alexander Graf , Stefan Weinhuber Cc: Heinz Graalfs , qemu-devel , Jens Freimann , Cornelia Huck , Paolo Bonzini , Einar Lueck On 02/05/12 14:54, Alexander Graf wrote: > On 05/02/2012 01:38 PM, Paolo Bonzini wrote: >>> On 05/02/2012 01:26 PM, Paolo Bonzini wrote: >>>>> and everyone should be happy :). I would really like to have as >>>>> little #ifdef TARGET_S390 code in QEMU. And #ifdef __s390__ is >>>>> even worse, >>>>> as it means we won't be able to execise that code path on other >>>>> architectures. >>>> True, but how do you exercise that code path with DASD geometry >>>> on !__s390__? >>> If we make things a flag for the guessing code, it should work just >>> as well with image files, right? >> Only when they're not blank. :) I was only thinking of #ifdef __s390__ >> for the call to HDIO_GETGEO. > > Well, if guessing is a function > > guess_size(disk_size, block_size) > > then we would be able to do the same on an image file. Christian, would that work? I think that the geometry values can not always be guessed correctly based on block_size and disk_size. Stefan, can you clarify that? If we cannot reliably guess the geometry based on blocksize and size, I still think that we should use the host values, e.g. after checking that BIODASDINFO2 returns successfully. Christian