From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Blake Subject: Re: [Qemu-devel] [PATCH for-2.8 v3] xen_disk: split discard input to match internal representation Date: Wed, 23 Nov 2016 05:40:00 -0600 Message-ID: <96433c69-0e6d-7cd9-3adb-6349d7dff1b3@redhat.com> References: <20161123103912.26699-1-olaf@aepfle.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7575511499051034383==" Return-path: In-Reply-To: <20161123103912.26699-1-olaf@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Olaf Hering , qemu-block@nongnu.org Cc: Kevin Wolf , "open list:X86" , "open list:All patches CC here" , Max Reitz , Stefano Stabellini , Anthony Perard List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============7575511499051034383== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="eHTrBkleq35mRDASX9LTe3kjLKujrRobI" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --eHTrBkleq35mRDASX9LTe3kjLKujrRobI Content-Type: multipart/mixed; boundary="HBEmVTL12diqsxGGphR7urUpILBFeuoV3"; protected-headers="v1" 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> --HBEmVTL12diqsxGGphR7urUpILBFeuoV3 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 --HBEmVTL12diqsxGGphR7urUpILBFeuoV3-- --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-- --===============7575511499051034383== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============7575511499051034383==--