From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoeVf-0007Ar-MG for qemu-devel@nongnu.org; Wed, 12 Nov 2014 15:27:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XoeVa-0001pM-IS for qemu-devel@nongnu.org; Wed, 12 Nov 2014 15:27:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoeVa-0001oU-As for qemu-devel@nongnu.org; Wed, 12 Nov 2014 15:27:18 -0500 Message-ID: <5463C29F.90700@redhat.com> Date: Wed, 12 Nov 2014 13:27:11 -0700 From: Eric Blake MIME-Version: 1.0 References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Q9WeU2cCS4g1PURgEqitbM4MACiMueC10" Subject: Re: [Qemu-devel] [PATCH 1/1] block migration: fix return value mismatch List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gary Hook , "qemu-devel@nongnu.org" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Q9WeU2cCS4g1PURgEqitbM4MACiMueC10 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/12/2014 11:48 AM, Gary Hook wrote: > The function uses a ternary return value (<, >, =3D=3D 0) defined as an= int. The code in in this function uses int64_t types to collect ftell() = return values and use their difference as the return value. Unfortunately= , narrowing of integer types results in the disposal of the left-most bit= s that won't fit in the target type. Here, for values larger than 2GB, th= e resulting value will be randomly negative or positive, based on total n= umber of blocks. The patch ensures that only +1, -1, or 0 are returned to= properly report status. >=20 Please wrap commit messages at around 70 characters ('git log' likes to indent, and people still like to use 80-column windows to read 'git log')= =2E >=20 >=20 >=20 > diff -u -r a/block-migration.c b/block-migration.c > Your patch is missing a 'Signed-off-by' line, which is essential to getting it applied. It is also missing the typical '---' separator between commit message and patch body. > --- a/block-migration.c 2014-04-17 08:30:59.000000000 -0500 >=20 > +++ b/block-migration.c 2014-11-10 12:39:10.727431187 -0600 >=20 > @@ -628,6 +628,7 @@ Your patch is mal-formed, with too many blank lines inserted by your mailer. We generally request that you use 'git send-email' rather than manually pasting your patch into an email, since git is more likely to send a correctly-formed message. Also, it appears that you sent a 0/1 cover letter, but forgot to put this message as In-Reply-To that message. For a single patch, no cover letter is necessary; but for a patch series, it is important to properly thread your emails. More details on proper patch submission can be found here: http://wiki.qemu.org/Contribute/SubmitAPatch At any rate, the patch looks reasonable, so please resend it as v2 with your Signed-off-by. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Q9WeU2cCS4g1PURgEqitbM4MACiMueC10 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJUY8KfAAoJEKeha0olJ0NqYY8H/jcGOnRRQhFL1ZpcWwRfVrMF uRqBh86uDnvJ2BeoS38lvC3HlVBaxTTksumi/tz1zlsnEz+qCefFZbIyTarP//2S QzViVuyTyeJdbVpT6ujpXl/8TqrRSu5pvQ16XNgJYihqhmMOK4rugTkTBATUCm+0 JNNBNqSCRuw1LS7BIQ3HfVwXhQbszhhDATteEK9y0Ed3IrqKFwfxOgQW9wWFzJf3 4ghetyv+XCZL01zpgg+zb25BNNvAITcTTPvYo+j44BjwRnXW4FKh3jlxrlmCi4xd Qrdu9YJThPeLk167k5E3ulTCKHE6rRkHLkXJwSrnrJ1+LPAECn3VMDvn/YQhxs0= =ki9P -----END PGP SIGNATURE----- --Q9WeU2cCS4g1PURgEqitbM4MACiMueC10--