Received: from eggs.gnu.org ([2001:4830:134:3::10]:41345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xmlvz-0002rF-AG for qemu-devel@nongnu.org; Fri, 07 Nov 2014 10:58:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xmlvt-0001WE-3d for qemu-devel@nongnu.org; Fri, 07 Nov 2014 10:58:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xmlvs-0001W5-Rq for qemu-devel@nongnu.org; Fri, 07 Nov 2014 10:58:41 -0500 From: Markus Armbruster References: <1406636839-11946-1-git-send-email-tumanova@linux.vnet.ibm.com> <545B9A92.4030802@de.ibm.com> <8761ere5dx.fsf@blackfin.pond.sub.org> <545C9576.9080703@de.ibm.com> Date: Fri, 07 Nov 2014 16:58:26 +0100 In-Reply-To: <545C9576.9080703@de.ibm.com> (Christian Borntraeger's message of "Fri, 07 Nov 2014 10:48:38 +0100") Message-ID: <87egtf6lzx.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] Geometry and blocksize support for backing devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger Cc: Kevin Wolf , Stefan Hajnoczi , Ekaterina Tumanova , qemu-devel@nongnu.org, Viktor Mihajlovski , dahi@linux.vnet.ibm.com, cornelia.huck@de.ibm.com, Paolo Bonzini Christian Borntraeger writes: > Am 07.11.2014 10:17, schrieb Markus Armbruster: >> Christian Borntraeger writes: [...] >>> Now here comes my proposal: >>> Markus statement brought up an idea of special casing DASDs support. We can >>> call an ioctl BIODASDINFO on the block device that will only >>> succeed if the host >>> disk is really a dasd. We could enable the auto detection for that case. >> >> If BIODASDINFO succeeds, QEMU uses that instead of making up device >> geometry as described above. Correct? >> >> Let's spell out when exactly BIODASDINFO succeeds, to avoid >> misunderstandings. It does when the backend is a DASD (/dev/dasd*). >> What about a partition on a DASD? A file in a filesystem on a DASD? > > BIODASDINFO (we will propbably use BIODASDINFO2) will succeed only if > the backend is backed by a dasd or its partitions. It will fail on > other block devices and files on a dasd. > > Now: when passing in only a dasd partition we cannot do any sane thing > with the dasd oddities inside the guest (e.g. creating dasd > partitions, reading volume label or TOC etc.) > So there is no need passing in geometry and block size. We could make > the special case even stricter and check for start == 0 when doing the > HDIO_GETGEO. > So pass-through of geometry and block size is only performed if > BIODASDINFO2 succeeds, and the GETGEO call indicates that this is not > a partions by having start == 0. > > Makes sense? Yes. Thank you! [...]