From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9We5-0005ls-GF for qemu-devel@nongnu.org; Wed, 23 Nov 2016 07:27:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9We4-00053F-MV for qemu-devel@nongnu.org; Wed, 23 Nov 2016 07:27:25 -0500 Date: Wed, 23 Nov 2016 13:27:13 +0100 From: Kevin Wolf Message-ID: <20161123122713.GA5068@noname.redhat.com> References: <20161123103912.26699-1-olaf@aepfle.de> <96433c69-0e6d-7cd9-3adb-6349d7dff1b3@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AhhlLboLdkugWU4S" Content-Disposition: inline In-Reply-To: <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 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Olaf Hering , qemu-block@nongnu.org, Stefano Stabellini , "open list:All patches CC here" , Max Reitz , "open list:X86" , Anthony Perard --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am 23.11.2016 um 12:40 hat Eric Blake geschrieben: > 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 > > --- >=20 > Qualifies as a bug fix, so requesting 2.8 inclusion. > Reviewed-by: Eric Blake Stefano, are you going to merge this or should I take a look? Kevin --AhhlLboLdkugWU4S Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJYNYshAAoJEH8JsnLIjy/Wd0cP+gJvYcI3FW/mMcqr5aJS3y/z KVPCfhQIRd+d8vbZvdz+LhRPQ2ZHiN6FUvOQxFTCqZtaS9FYSaODr9w43wX5Esca n7SBohv4XU+lW1gYgZveZjIzz/W9Dzeu6czUCFQPZ9dBl7yf+uQIg0+q6arLtE/B iKegJgC0U/0x9EpC91dmaN7F8RoCXyUIXYj/g9Zh97PZdUso8dKMDSLXefbwosIS vetLsEo88WsuQxrNYbx5na7flvrQ94MiI02aCnX5JpIzapmBaW4XybxBMHWKBByY Can/9SfFdMaDWXQRGdx6DEnu4JIa/0BR5Zdm5Dk/QL38fc+IvzP3GMhXPSxlZBsc ZMcjuwkRvu8eY3MVX8ej2ZdtVAahsmxqnbThNSpPMQtiTM1Aif/bcDDZB+zi5tSr 604RhHm+omth5h2JOzIg7Qzp7i+jmPVPxBcWmDGnMQ0v6oAuXWFQDXzRD5VbQhyP mJCvFsOY0leospVvO5eQBWNV3cl5JJ5OliOdpfjtTUbYmXGmfNkmC2NZ6M6FGlUs AZSXSB3CymPqpBDrCSoPcGzUfKMf7NrjfCg7ysX7nH0XtDexfXSq6AQiSKvV4vRG YQR5pbO6zUZp3xaEzwHMb3nn0YcrZlxsDrminCNrkD97ih87PsEJWSbMMDYlw9g2 etF56pJslizqSUSofkGQ =NZs+ -----END PGP SIGNATURE----- --AhhlLboLdkugWU4S-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Wolf Subject: Re: [Qemu-devel] [PATCH for-2.8 v3] xen_disk: split discard input to match internal representation Date: Wed, 23 Nov 2016 13:27:13 +0100 Message-ID: <20161123122713.GA5068@noname.redhat.com> References: <20161123103912.26699-1-olaf@aepfle.de> <96433c69-0e6d-7cd9-3adb-6349d7dff1b3@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AhhlLboLdkugWU4S" Return-path: Content-Disposition: inline In-Reply-To: <96433c69-0e6d-7cd9-3adb-6349d7dff1b3@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-block-bounces+gceqb-qemu-block=m.gmane.org@nongnu.org Sender: "Qemu-block" To: Eric Blake Cc: Olaf Hering , "open list:X86" , qemu-block@nongnu.org, "open list:All patches CC here" , Max Reitz , Stefano Stabellini , Anthony Perard List-Id: xen-devel@lists.xenproject.org --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am 23.11.2016 um 12:40 hat Eric Blake geschrieben: > 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 > > --- >=20 > Qualifies as a bug fix, so requesting 2.8 inclusion. > Reviewed-by: Eric Blake Stefano, are you going to merge this or should I take a look? Kevin --AhhlLboLdkugWU4S Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJYNYshAAoJEH8JsnLIjy/Wd0cP+gJvYcI3FW/mMcqr5aJS3y/z KVPCfhQIRd+d8vbZvdz+LhRPQ2ZHiN6FUvOQxFTCqZtaS9FYSaODr9w43wX5Esca n7SBohv4XU+lW1gYgZveZjIzz/W9Dzeu6czUCFQPZ9dBl7yf+uQIg0+q6arLtE/B iKegJgC0U/0x9EpC91dmaN7F8RoCXyUIXYj/g9Zh97PZdUso8dKMDSLXefbwosIS vetLsEo88WsuQxrNYbx5na7flvrQ94MiI02aCnX5JpIzapmBaW4XybxBMHWKBByY Can/9SfFdMaDWXQRGdx6DEnu4JIa/0BR5Zdm5Dk/QL38fc+IvzP3GMhXPSxlZBsc ZMcjuwkRvu8eY3MVX8ej2ZdtVAahsmxqnbThNSpPMQtiTM1Aif/bcDDZB+zi5tSr 604RhHm+omth5h2JOzIg7Qzp7i+jmPVPxBcWmDGnMQ0v6oAuXWFQDXzRD5VbQhyP mJCvFsOY0leospVvO5eQBWNV3cl5JJ5OliOdpfjtTUbYmXGmfNkmC2NZ6M6FGlUs AZSXSB3CymPqpBDrCSoPcGzUfKMf7NrjfCg7ysX7nH0XtDexfXSq6AQiSKvV4vRG YQR5pbO6zUZp3xaEzwHMb3nn0YcrZlxsDrminCNrkD97ih87PsEJWSbMMDYlw9g2 etF56pJslizqSUSofkGQ =NZs+ -----END PGP SIGNATURE----- --AhhlLboLdkugWU4S--