From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40612) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9VuN-0003Nx-LX for qemu-devel@nongnu.org; Wed, 23 Nov 2016 06:40:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9VuM-0004LE-6G for qemu-devel@nongnu.org; Wed, 23 Nov 2016 06:40:11 -0500 References: <20161123103912.26699-1-olaf@aepfle.de> From: Eric Blake Message-ID: <96433c69-0e6d-7cd9-3adb-6349d7dff1b3@redhat.com> Date: Wed, 23 Nov 2016 05:40:00 -0600 MIME-Version: 1.0 In-Reply-To: <20161123103912.26699-1-olaf@aepfle.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="eHTrBkleq35mRDASX9LTe3kjLKujrRobI" Subject: Re: [Qemu-devel] [PATCH for-2.8 v3] xen_disk: split discard input to match internal representation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Olaf Hering , qemu-block@nongnu.org Cc: Kevin Wolf , Stefano Stabellini , "open list:All patches CC here" , Max Reitz , "open list:X86" , Anthony Perard This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --eHTrBkleq35mRDASX9LTe3kjLKujrRobI From: Eric Blake To: Olaf Hering , qemu-block@nongnu.org Cc: Kevin Wolf , Stefano Stabellini , "open list:All patches CC here" , Max Reitz , "open list:X86" , Anthony Perard Message-ID: <96433c69-0e6d-7cd9-3adb-6349d7dff1b3@redhat.com> Subject: Re: [Qemu-devel] [PATCH for-2.8 v3] xen_disk: split discard input to match internal representation References: <20161123103912.26699-1-olaf@aepfle.de> In-Reply-To: <20161123103912.26699-1-olaf@aepfle.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/23/2016 04:39 AM, Olaf Hering wrote: > The guest sends discard requests as u64 sector/count pairs, but the > block layer operates internally with s64/s32 pairs. The conversion > leads to IO errors in the guest, the discard request is not processed. >=20 > domU.cfg: > 'vdev=3Dxvda, format=3Dqcow2, backendtype=3Dqdisk, target=3D/x.qcow2'= > domU: > mkfs.ext4 -F /dev/xvda > Discarding device blocks: failed - Input/output error >=20 > Fix this by splitting the request into chunks of BDRV_REQUEST_MAX_SECTO= RS. > Add input range checking to avoid overflow. >=20 > Fixes f313520 ("xen_disk: add discard support") >=20 > Signed-off-by: Olaf Hering > --- Qualifies as a bug fix, so requesting 2.8 inclusion. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --eHTrBkleq35mRDASX9LTe3kjLKujrRobI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJYNYAQAAoJEKeha0olJ0NqftkH+gN30UXW/rC7UmgTEmJJMcJK tEdXXNDwrLI0P/MQ8nhDVyyLCZ0XH1soLLdocZ6mA8dfAXohpQt9uHQKTSv0NEF3 7cRS4vMgIZgSyqjO42NFjq8ac3FCDy8H9NOY3wATvyj27aEyr55QaD9uK3Iq+uBu qos/7vHckeBYWlys/v1ZP+Jcs3q9jDzA5zaia1a9OjXkwISjwmwz1QPGyBz5VwDm C3ICPL6hgPxUkZCp6Gl8bs+53OXRyiPVhXMXfIf0UTlz+fkjobkp7jDJ7V5UX+gk 5gj0VSIrHlPGrapgMeb9R/9JeGjU6YfxGhkk12lqqPfj2PEQEl00y3guU1Qi+IQ= =Pw2U -----END PGP SIGNATURE----- --eHTrBkleq35mRDASX9LTe3kjLKujrRobI--