From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvqPe-0005j0-QB for qemu-devel@nongnu.org; Mon, 30 Jul 2012 09:53:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SvqPd-0003uL-Kb for qemu-devel@nongnu.org; Mon, 30 Jul 2012 09:53:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4071) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvqPd-0003uF-BG for qemu-devel@nongnu.org; Mon, 30 Jul 2012 09:53:33 -0400 Message-ID: <501691DA.50808@redhat.com> Date: Mon, 30 Jul 2012 07:53:30 -0600 From: Eric Blake MIME-Version: 1.0 References: <1343127865-16608-1-git-send-email-pbonzini@redhat.com> <1343127865-16608-44-git-send-email-pbonzini@redhat.com> <5013EC8A.3000409@redhat.com> <50168ED0.7070502@redhat.com> In-Reply-To: <50168ED0.7070502@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig809B41158039041193D82BF3" Subject: Re: [Qemu-devel] [PATCH 43/47] mirror: allow customizing the granularity List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig809B41158039041193D82BF3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/30/2012 07:40 AM, Paolo Bonzini wrote: > Il 28/07/2012 15:43, Eric Blake ha scritto: >>>> + if (granularity < 512 || granularity > 1048576 * 64) { >>>> + error_set(errp, QERR_INVALID_PARAMETER, device); >>>> + return; >>>> + } >>>> + if (granularity & (granularity - 1)) { >>>> + error_set(errp, QERR_INVALID_PARAMETER, device); >>>> + return; >> In the XBZLRE migration series, we decided to round the users input do= wn >> to a power of two instead of reject it. Should we do that here? >=20 > I can certainly do that, but do you have a pointer to the discussion so= > that I can understand the rationale? https://lists.gnu.org/archive/html/qemu-devel/2012-05/msg02421.html --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig809B41158039041193D82BF3 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.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQFpHaAAoJEKeha0olJ0Nql/cH/275ov+fUATXnzN8TpwSBLgA Ca2bYJoubg66Efx9VmeeNyTiAbStHfjq7D2h9F0o3u2Ledu49qUD9amcZsUmNtjH BgbF0bB7nDyoG1qgKNdu3ODogE/u4bycKgIIWEbtOkDETzJTrEPVItCWJS4VM2pp jnoUmXtTW7vjJfaA9QQTfow7vHGXr7gQeBBVTBM3kIRLgFrSZAWk5Zs2B8R4iemA 0gP2Jqvi3YLTRwhHN4FErrlfci0MeHbUjpiuVm4h4sV+qYeKjypEQyCln5wJyD7h VuSpqw2bzwtxb39lbdpqkscnryUMGfTxosxNcIS7oE8SV/CWStJujGwXFZwFFr8= =31cH -----END PGP SIGNATURE----- --------------enig809B41158039041193D82BF3--