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: Tue, 22 Nov 2016 18:00:01 +0100 Message-ID: <20161122170001.GA19126@aepfle.de> References: <20161118102452.5779-1-olaf@aepfle.de> <42ca6186-ca47-3c63-d2e0-54f2ed9f4be7@redhat.com> <20161118174108.GF5717@aepfle.de> <20161122161235.GA24220@aepfle.de> <1340ce97-092f-877a-d244-f0bf1b50e6e6@redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4662789557831117653==" Return-path: In-Reply-To: <1340ce97-092f-877a-d244-f0bf1b50e6e6@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Eric Blake Cc: Kevin Wolf , "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 --===============4662789557831117653== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YiEDa0DAkWCtVeE4" Content-Disposition: inline --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Tue, Nov 22, Eric Blake wrote: > if (sec_start + sec_count < sec_count || > sec_start > (INT64_MAX >> BDRV_SECTOR_BITS) - sec_count) { > return false; > } My point was: how does this handle sec_start=0,sec_count=UINT64_MAX or sec_start=INT64_MAX,sec_count=INT64_MAX? For me this gets past the if(). Olaf --YiEDa0DAkWCtVeE4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAlg0eY0ACgkQXUKg+qaYNn4m8ACfce88OcDGWSKu/q0ugIutuxzO DXkAoMiMU7/H/YAE9XYSb6ca/vvbWmPy =LAhn -----END PGP SIGNATURE----- --YiEDa0DAkWCtVeE4-- --===============4662789557831117653== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============4662789557831117653==--