From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y70Qj-0001fo-JB for qemu-devel@nongnu.org; Fri, 02 Jan 2015 06:30:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y70Qe-0006pj-J1 for qemu-devel@nongnu.org; Fri, 02 Jan 2015 06:30:09 -0500 Received: from mail-we0-x22a.google.com ([2a00:1450:400c:c03::22a]:35380) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y70Qe-0006og-8M for qemu-devel@nongnu.org; Fri, 02 Jan 2015 06:30:04 -0500 Received: by mail-we0-f170.google.com with SMTP id w61so4388788wes.29 for ; Fri, 02 Jan 2015 03:30:03 -0800 (PST) Date: Fri, 2 Jan 2015 11:30:01 +0000 From: Stefan Hajnoczi Message-ID: <20150102113001.GB10823@stefanha-thinkpad.redhat.com> References: <1418901484-12988-1-git-send-email-tumanova@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UHN/qo2QbUvPLonB" Content-Disposition: inline In-Reply-To: <1418901484-12988-1-git-send-email-tumanova@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH v5 0/5] Geometry and blocksize detection for backing devices. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ekaterina Tumanova Cc: kwolf@redhat.com, thuth@linux.vnet.ibm.com, borntraeger@de.ibm.com, armbru@redhat.com, Public KVM Mailing List , mihajlov@linux.vnet.ibm.com, dahi@linux.vnet.ibm.com, stefanha@redhat.com, cornelia.huck@de.ibm.com, pbonzini@redhat.com --UHN/qo2QbUvPLonB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 18, 2014 at 12:17:59PM +0100, Ekaterina Tumanova wrote: > Updates v4 -> v5: >=20 > Minor Updates according the last review from Markus: > 1. update commit message for patch 2 > 2. fix comment typos > 3. fix check_for_dasd to return -1 instead of -ENOTSUP >=20 > Thanks, > Kate. >=20 > --------------------------------------------------------------- > Patchset Description (didn't change): >=20 > Proper geometry and blocksize information is vital for support of > DASD/ECKD drives in Linux guests. Otherwise things will fail in > certain cases. >=20 > The existing geometry and blocksize qemu defaults have no sense > for DASD drives (hd_geometry_guess detection and 512 for sizes). > Setting this information manually in XML file is far from user-friendly, > as the admin has to manually look up the properties of the > host disks and then modify the guest definition accordingly. What is the expected behavior when you dd the disk image from the DASD to a raw image file on an NFS file system on the host? It seems you'd lose the geometry detection and the disk image could be unusable from inside the guest. > Since Linux uses DASDs as normal block devices, we actually > want to use virtio-blk to pass those to KVM guests. >=20 > In order to avoid any change in behavior of other drives, the DASD > special casing was advised. We call ioctl BIODASDINFO2 on the block > device, which will only succeed if the device is really a DASD. >=20 > In order to retrieve the underlying device geometry and blocksizes > a new block-backend functions and underlying driver functions were > introduced (blk_probe_blocksizes anf blk_probe_geometry wrappers > and corresponding bdrv_xxxxxx functions). >=20 > As for now only "host_device" driver received new detection methods. > For "raw" we call childs method as usual. In future one may update > other drivers to add some other detection heuristics. >=20 > If the host_device appears to be a DASD, the driver functions > (hdev_probe_blocksizes and hdev_probe_geometry) will call certain > ioctls in order to detect geometry and blocksizes of the underlying devic= e. > if probing failed bdrv_probe_blocksizes caller will set defaults, > and bdrv_probe_geometry will fail to allow fallback to old detection logi= c. >=20 > The front-end (BlockConf API) was updated: > 1. a new blkconf_blocksizes function was added. It doesn't > change user-defined blocksize values. If properties are unset, it will > set values, returned by blk_probe_backend. In order to allow this logic, > blocksize properties were initialized with 0. (driver will return 512 if > backing device probing didn't succeed or if driver method is not defined). > 2. hd_geometry guess was changed to firstly try to retrieve values via > blk_probe_geometry and if it fails, fallback to the old logic. Thanks for the detailed cover letter, it's much more than I had in mind when I requested a cover letter. I'm looking for an overview of the problem this series fixes and the rationale for the solution. It's not necessary to explain the individual code changes in the cover letter since they are already covered by the patches. --UHN/qo2QbUvPLonB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUpoE5AAoJEJykq7OBq3PI5vkH/im5ce9djmVcf7VxrrRFfPBp C3dbLUVtD6Xhrk2Rmc+MdW7iMq9lweZzmnbj97L0YlbOwKg1N9LMOYEtQ0aRmuuL 0Bt2jvuIiC2E+62zUzcC0qlaqLW8X+5rSdRfyEz2+7DyiYXiKMKqnj8ZKOixWbXv H8X0Oft56bEXZ2H054vrR9SIz6ykjJBHv5xVh9wzM1VeGKPd0PmVB4ZDEZbFGWr8 DmVDwV5NdUM1f5yP54myq1xhMT1Kml/ZpBQAzh9TsCr9aOTuNrPX2tFxNqqwMVG0 Wakf2bVI4qQMPEq4c2nkCYUk1H3XqZrAqDBi50jYPfL1vCzkZQ59iBE3ZTS2v8A= =L6Nd -----END PGP SIGNATURE----- --UHN/qo2QbUvPLonB--