From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1almIL-00079F-WB for qemu-devel@nongnu.org; Thu, 31 Mar 2016 19:46:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1almII-00021p-NG for qemu-devel@nongnu.org; Thu, 31 Mar 2016 19:46:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1almII-00021e-HJ for qemu-devel@nongnu.org; Thu, 31 Mar 2016 19:46:30 -0400 References: <1459429325-16350-1-git-send-email-den@openvz.org> From: Eric Blake Message-ID: <56FDB6D2.4070305@redhat.com> Date: Thu, 31 Mar 2016 17:46:26 -0600 MIME-Version: 1.0 In-Reply-To: <1459429325-16350-1-git-send-email-den@openvz.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ObOf8VUvpW4ePnhi8fj0bVttWgxLcWsLn" Subject: Re: [Qemu-devel] [PATCH v2 1/1] NBD proto: add WRITE_ZEROES extension List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" , nbd-general@lists.sourceforge.net, qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , Pavel Borzenkov , Alex Bligh , Paolo Bonzini , Wouter Verhelst This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ObOf8VUvpW4ePnhi8fj0bVttWgxLcWsLn Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/31/2016 07:02 AM, Denis V. Lunev wrote: > From: Pavel Borzenkov >=20 > There exist some cases when a client knows that the data it is going to= > write is all zeroes. Such cases include mirroring or backing up a devic= e > implemented by a sparse file. >=20 > With current NBD command set, the client has to issue NBD_CMD_WRITE > command with zeroed payload and transfer these zero bytes through the > wire. The server has to write the data onto disk, effectively denying > the sparseness. >=20 > To remedy this, the patch adds WRITE_ZEROES extension with one new > NBD_CMD_WRITE_ZEROES command. >=20 > +++ b/doc/proto.md > @@ -261,6 +261,8 @@ immediately after the handshake flags field in olds= tyle negotiation: > schedule I/O accesses as for a rotational medium > - bit 5, `NBD_FLAG_SEND_TRIM`; should be set to 1 if the server suppor= ts > `NBD_CMD_TRIM` commands > +- bit 6, `NBD_FLAG_SEND_WRITE_ZEROES`; should be set to 1 if the serve= r > + supports `NBD_CMD_WRITE_ZEROES` commands Hmm, we've picked overlapping bits between your proposal and mine for `NBD_FLAG_SEND_DF`. Obviously, whoever goes in second gets bit 7. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ObOf8VUvpW4ePnhi8fj0bVttWgxLcWsLn 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/ iQEcBAEBCAAGBQJW/bbSAAoJEKeha0olJ0Nq0doH/icC01IHAyx5u1ekvwfX7Hu2 hSN7+V6sWpxGSypixIgO/zVLLkGuvNWf+q3QOfViqJn4sA26VuNbItiz5XWbg80i ca3mRAGRWsfj1VI27wz0Wpvsi1+X+9r+re2I3n4GFedYyiryqTHwYgBFAgN7O1Vi gd9qpy2VIZkHYe61nqLadIoN8AfRtNczlDU4M9w2Ccw048VexdpNVdICg+nWgc4O uo6JxZ1XOLivYaBP2I1h/0HDidSeYacqXHF1YtoHCZLf8YBxJeXP+XU+mq4+ZZIj pDXM/FmyLxaUQMJxh0qwug1Uofu2Om6y/XlGBSURC0P2R3w8NDqEbBKn13VOIwQ= =UGxq -----END PGP SIGNATURE----- --ObOf8VUvpW4ePnhi8fj0bVttWgxLcWsLn--