From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGRp2-0000YJ-B4 for qemu-devel@nongnu.org; Fri, 24 Jun 2016 10:11:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGRp0-0002uP-6Z for qemu-devel@nongnu.org; Fri, 24 Jun 2016 10:11:03 -0400 References: <1466721446-27737-1-git-send-email-eblake@redhat.com> <1466721446-27737-17-git-send-email-eblake@redhat.com> <20160624061231.GA13266@ad.usersys.redhat.com> From: Eric Blake Message-ID: <576D3F6E.10400@redhat.com> Date: Fri, 24 Jun 2016 08:10:54 -0600 MIME-Version: 1.0 In-Reply-To: <20160624061231.GA13266@ad.usersys.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="91U392nRdu2xMCexMvU9I5kg40p9xapCa" Subject: Re: [Qemu-devel] [PATCH v3 16/22] block: Wording tweaks to write zeroes limits List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, kwolf@redhat.com, stefanha@redhat.com, Max Reitz This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --91U392nRdu2xMCexMvU9I5kg40p9xapCa From: Eric Blake To: Fam Zheng Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, kwolf@redhat.com, stefanha@redhat.com, Max Reitz Message-ID: <576D3F6E.10400@redhat.com> Subject: Re: [PATCH v3 16/22] block: Wording tweaks to write zeroes limits References: <1466721446-27737-1-git-send-email-eblake@redhat.com> <1466721446-27737-17-git-send-email-eblake@redhat.com> <20160624061231.GA13266@ad.usersys.redhat.com> In-Reply-To: <20160624061231.GA13266@ad.usersys.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/24/2016 12:12 AM, Fam Zheng wrote: > On Thu, 06/23 16:37, Eric Blake wrote: >> Improve the documentation of the write zeroes limits, to mention >> additional constraints that drivers should observe. Worth squashing >> into commit cf081fca, if that hadn't been pushed already :) >> >> Signed-off-by: Eric Blake >> >> --- >> v3: new patch, split off from "block: Switch discard length bounds..."= >> --- >> include/block/block_int.h | 7 +++++-- >> 1 file changed, 5 insertions(+), 2 deletions(-) >> >> diff --git a/include/block/block_int.h b/include/block/block_int.h >> index 7d2b152..7a4a00f 100644 >> --- a/include/block/block_int.h >> +++ b/include/block/block_int.h >> @@ -331,11 +331,14 @@ typedef struct BlockLimits { >> int64_t discard_alignment; >> >> /* maximum number of bytes that can zeroized at once (since it is= >> - * signed, it must be < 2G, if set) */ >> + * signed, it must be < 2G, if set), should be multiple of >> + * pwrite_zeroes_alignment. May be 0 if no inherent 32-bit limit = */ >=20 > "inherent 32-bit limit"? What is special about 32-bit other than this f= ield is > 32-bit? Anyway, >=20 > Reviewed-by: Fam Zheng Someday, we may want to bump it up to a 64-bit field, and convert the driver callback for write_zeroes to take a 64-bit size. But first we'd have to audit to make sure all drivers properly advertise their maximum (for example, NBD is still hard-coded to a 32-bit maximum write_zeroes, even if the callback would permit a 64-bit size). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --91U392nRdu2xMCexMvU9I5kg40p9xapCa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXbT9uAAoJEKeha0olJ0NqMAMH/3+AlBFqVbZ2nbIxqf2pmZWv XOUuJMzP6icFdOCvNqRUuSnIBOVuIZDX7cwerLfb1jYefIV8y2W95QjtdlrqwFeN /m7MmQCXz5xsLmZXnT2ZvxRKkuTYDB+U5p4IgzT1s65VYKH/c9LYExP77ZDKDjhn ncRMu8raz1HZS3dEn5WFsiead2pRLVrcNpc3QsN6fDGL/0XLGtBVebGoT04D04u9 ZLgBjKDr6ZnPURpmkAWzX+DuS3mf8WKzbGs5jtQkkKeVaBUxRKX9p9cwvnqNUNTW EV3YLzFWcqGdKrR6QyU4QLCkP7MP4bWQ7dNrtM0LuSPzfhwkCT+ijb+/TpU8T94= =E0IY -----END PGP SIGNATURE----- --91U392nRdu2xMCexMvU9I5kg40p9xapCa--