From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6mhU-0001CM-P3 for qemu-devel@nongnu.org; Tue, 15 Nov 2016 17:59:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6mhQ-00016Q-HB for qemu-devel@nongnu.org; Tue, 15 Nov 2016 17:59:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56078) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c6mhQ-00016I-95 for qemu-devel@nongnu.org; Tue, 15 Nov 2016 17:59:32 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 70E5C4E35B for ; Tue, 15 Nov 2016 22:59:31 +0000 (UTC) References: <1477924663-30950-1-git-send-email-pbonzini@redhat.com> <1477924663-30950-25-git-send-email-pbonzini@redhat.com> From: Eric Blake Message-ID: Date: Tue, 15 Nov 2016 16:59:30 -0600 MIME-Version: 1.0 In-Reply-To: <1477924663-30950-25-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wloS26x0w2NX9BKEFQ2ECMQAXJmKLS2Ei" Subject: Re: [Qemu-devel] [PULL 24/27] nbd: Implement NBD_CMD_WRITE_ZEROES on client List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --wloS26x0w2NX9BKEFQ2ECMQAXJmKLS2Ei From: Eric Blake To: Paolo Bonzini , qemu-devel@nongnu.org Message-ID: Subject: Re: [PULL 24/27] nbd: Implement NBD_CMD_WRITE_ZEROES on client References: <1477924663-30950-1-git-send-email-pbonzini@redhat.com> <1477924663-30950-25-git-send-email-pbonzini@redhat.com> In-Reply-To: <1477924663-30950-25-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/31/2016 09:37 AM, Paolo Bonzini wrote: > From: Eric Blake >=20 > Upstream NBD protocol recently added the ability to efficiently > write zeroes without having to send the zeroes over the wire, > along with a flag to control whether the client wants a hole. >=20 > The generic block code takes care of falling back to the obvious > write of lots of zeroes if we return -ENOTSUP because the server > does not have WRITE_ZEROES. >=20 > Ideally, since NBD_CMD_WRITE_ZEROES does not involve any data > over the wire, we want to support transactions that are much > larger than the normal 32M limit imposed on NBD_CMD_WRITE. But > the server may still have a limit smaller than UINT_MAX, so > until experimental NBD protocol additions for advertising various > command sizes is finalized (see [1], [2]), for now we just stick to > the same limits as normal writes. >=20 > [1] https://github.com/yoe/nbd/blob/extension-info/doc/proto.md > [2] https://sourceforge.net/p/nbd/mailman/message/35081223/ >=20 > Signed-off-by: Eric Blake > Message-Id: <1476469998-28592-17-git-send-email-eblake@redhat.com> > Signed-off-by: Paolo Bonzini > --- > block/nbd-client.c | 35 +++++++++++++++++++++++++++++++++++ > block/nbd-client.h | 2 ++ > block/nbd.c | 4 ++++ > 3 files changed, 41 insertions(+) This patch went through so much rebasing that I failed to realize it was originally written prior to adding commit 465fe887 with its bs->supported_zero_flags. As such, the block layer eats flags and never allows the server to perform FUA or do an unmap. I'll be posting a followup for inclusion in 2.8, alongside my other pending patches (I found it because of blkdebug enhancements that I'm writing, although the blkdebug changes themselves are 2.9 material). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --wloS26x0w2NX9BKEFQ2ECMQAXJmKLS2Ei 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/ iQEcBAEBCAAGBQJYK5NSAAoJEKeha0olJ0NqEPAIAKnUjSCd31Y05+RaE4gfe7ze T64nA6uJMRcp0GjQA9BG+iLo2i4Wl4Jy7XPUqHuijW9iUTE8R2JahR+pz5elASq5 Wr4MFwlFHePBtwz6vrIxljuW1PN/l/ZjdmyhdthwjsRM9tUwaG0PW1pLzNthP1Ze xsgV+4VjlidIRAtetQVWeak+ZdzbHmsb034BEYpf0Pe/LJVtMDhhqJN2X45cDmRY B3FV5cGpXlEhFV1tVnXTJPUfqJdPUjtj9v48n+mlxp8NWEKd+CseKRhyldTFzpQF Aa1alMRm5qPDhumHR3isj/mjZnK7vLWmMpowPRxXfkvfoTenW1ZErNpZKJXe3us= =tfAn -----END PGP SIGNATURE----- --wloS26x0w2NX9BKEFQ2ECMQAXJmKLS2Ei--