From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7k1H-0003y6-Rb for qemu-devel@nongnu.org; Fri, 18 Nov 2016 09:20:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7k1H-0005v7-1h for qemu-devel@nongnu.org; Fri, 18 Nov 2016 09:19:59 -0500 Date: Fri, 18 Nov 2016 15:19:39 +0100 From: Olaf Hering In-Reply-To: <5aa0cd45-0c73-b940-81e1-235625a428a2@redhat.com> References: <20161118102452.5779-1-olaf@aepfle.de> <5aa0cd45-0c73-b940-81e1-235625a428a2@redhat.com> Message-ID: <37C38B91-CDF7-443F-A517-3D16187B2A1F@aepfle.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] xen_disk: convert discard input to byte ranges List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-block@nongnu.org Cc: Kevin Wolf , Stefano Stabellini , "open list:All patches CC here" , Max Reitz , "open list:X86" , Anthony Perard Am 18=2E November 2016 14:43:18 MEZ, schrieb Eric Blake : >On 11/18/2016 04:24 AM, Olaf Hering wrote: >> The guest sends discard requests as u64 sector/count pairs, but the >> block layer operates internally with s64/s32 pairs=2E The conversion >> leads to IO errors in the guest, the discard request is not >processed=2E > >Doesn't the block layer already split discard requests into 2^31 byte >chunks? How would it do that without valid input? It was wrong before the sectors= to bytes conversion, and now its even worse given that all the world fits = into an int=2E Remember that there is no API to let the guest know about the limitations = of the host=2E=20 Olaf From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [Qemu-devel] [PATCH] xen_disk: convert discard input to byte ranges Date: Fri, 18 Nov 2016 15:19:39 +0100 Message-ID: <37C38B91-CDF7-443F-A517-3D16187B2A1F@aepfle.de> References: <20161118102452.5779-1-olaf@aepfle.de> <5aa0cd45-0c73-b940-81e1-235625a428a2@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <5aa0cd45-0c73-b940-81e1-235625a428a2@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 , 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 Am 18=2E November 2016 14:43:18 MEZ, schrieb Eric Blake : >On 11/18/2016 04:24 AM, Olaf Hering wrote: >> The guest sends discard requests as u64 sector/count pairs, but the >> block layer operates internally with s64/s32 pairs=2E The conversion >> leads to IO errors in the guest, the discard request is not >processed=2E > >Doesn't the block layer already split discard requests into 2^31 byte >chunks? How would it do that without valid input? It was wrong before the sectors= to bytes conversion, and now its even worse given that all the world fits = into an int=2E Remember that there is no API to let the guest know about the limitations = of the host=2E=20 Olaf