Received: from eggs.gnu.org ([2001:4830:134:3::10]:56396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bocPU-0006kP-UB for qemu-devel@nongnu.org; Mon, 26 Sep 2016 16:21:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bocPT-0003e7-RH for qemu-devel@nongnu.org; Mon, 26 Sep 2016 16:21:56 -0400 References: <1474893981-5302-1-git-send-email-vsementsov@virtuozzo.com> From: Eric Blake Message-ID: <7193be9e-4155-c5dc-282e-55ab1cf5f231@redhat.com> Date: Mon, 26 Sep 2016 15:21:46 -0500 MIME-Version: 1.0 In-Reply-To: <1474893981-5302-1-git-send-email-vsementsov@virtuozzo.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="To1Sf19EK4mhk3Uuk1cF9pqNJ918poULs" Subject: Re: [Qemu-devel] [PATCH] proto: add 'shift' extension. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org, qemu-block@nongnu.org, nbd-general@lists.sourceforge.net Cc: alex@alex.org.uk, kwolf@redhat.com, pbonzini@redhat.com, stefanha@redhat.com, w@uter.be, den@virtuozzo.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --To1Sf19EK4mhk3Uuk1cF9pqNJ918poULs From: Eric Blake To: Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org, qemu-block@nongnu.org, nbd-general@lists.sourceforge.net Cc: alex@alex.org.uk, kwolf@redhat.com, pbonzini@redhat.com, stefanha@redhat.com, w@uter.be, den@virtuozzo.com Message-ID: <7193be9e-4155-c5dc-282e-55ab1cf5f231@redhat.com> Subject: Re: [PATCH] proto: add 'shift' extension. References: <1474893981-5302-1-git-send-email-vsementsov@virtuozzo.com> In-Reply-To: <1474893981-5302-1-git-send-email-vsementsov@virtuozzo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/26/2016 07:46 AM, Vladimir Sementsov-Ogievskiy wrote: > This extension allows big requests for TRIM and WRITE_ZEROES through > special 'shift' parameter, which means that offset and length should be= > shifted left by several bits. >=20 > This is needed for efficient clearing large regions of the disk (up to > the whole disk). >=20 > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- >=20 > Here mentioned WRITE_ZEROES command which is only an experemental > extension for now. >=20 > To dicuss: > +- `NBD_OPT_SHIFT` (10) > + > + Defines shift used to calculate request offset and length if > + `NBD_CMD_FLAG_SHIFT` is set. > + > + Data: > + > + - 32 bits, shift (unsigned); Must not be larger than 32. Uggh. You're making the protocol stateful (the server has to remember what the client has previously requested via NBD_CMD_FLAG_SHIFT, rather than having ALL information it needs immediately available in the current NBD_CMD_WRITE_ZEROES). I'd much rather support a single flag that says to zero the entire disk than to introduce stateful variable-amount shifting. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --To1Sf19EK4mhk3Uuk1cF9pqNJ918poULs 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/ iQEcBAEBCAAGBQJX6YNaAAoJEKeha0olJ0NqpDkH/1OeGP9FFd/fJFpIl+L2RTQl tj6FvADA2ut2scfSQ5LWyhmUFa4ZPvg2unodKyNyk93o3FLjg5v4VOeu+I3yFe+9 FckLtAt8+VJcwHJvNNkPWwyOLkCJEo6CYI6I99cdlXLDspLuM9P8OnLDedHxCc8j F+OoOaoTr4kTByAVnKDPjSa9XYzhU80uJ/XFJ6Nfb4/wshpPZzWAlSIyWmg6mptu 89Q58kcLN6uszH+e1f7ANBhpcHiL0RYKGUW3wXecYel+VQtAxtBxNhRhrZDTGL86 Bc/fnHk4Dbt6uSPS/b3iTQ6F14fMHOcl1EXb9sV/loLJdtpTywiIZtAZjO8HBzs= =cJmR -----END PGP SIGNATURE----- --To1Sf19EK4mhk3Uuk1cF9pqNJ918poULs--