From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anBNj-0007T5-F2 for qemu-devel@nongnu.org; Mon, 04 Apr 2016 16:45:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anBNg-0006k1-8S for qemu-devel@nongnu.org; Mon, 04 Apr 2016 16:45:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anBNg-0006jt-0t for qemu-devel@nongnu.org; Mon, 04 Apr 2016 16:45:52 -0400 References: <1459787950-15286-1-git-send-email-eblake@redhat.com> <7AD0DCB1-1868-4AAD-A03D-C976A728DD75@alex.org.uk> <5702C1AB.8020601@redhat.com> <5702C8C3.1050300@openvz.org> <5702CAEA.4060804@openvz.org> <5702CE48.40302@openvz.org> From: Eric Blake Message-ID: <5702D279.6080905@redhat.com> Date: Mon, 4 Apr 2016 14:45:45 -0600 MIME-Version: 1.0 In-Reply-To: <5702CE48.40302@openvz.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2RLNjGSW96FcrjFKQl0q4XWFibqn2mjTX" Subject: Re: [Qemu-devel] [Nbd] [PATCH v2] doc: Add NBD_CMD_BLOCK_STATUS extension List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" , Alex Bligh Cc: "nbd-general@lists.sourceforge.net" , Kevin Wolf , "qemu-devel@nongnu.org" , Pavel Borzenkov , "Stefan stefanha@redhat. com" , Wouter Verhelst , Paolo Bonzini This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --2RLNjGSW96FcrjFKQl0q4XWFibqn2mjTX Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/04/2016 02:27 PM, Denis V. Lunev wrote: > On 04/04/2016 11:15 PM, Alex Bligh wrote: >> On 4 Apr 2016, at 21:13, Denis V. Lunev wrote: >> >>> As far as I remember that text we have had a number in request >>> specifying which bitmap to query and the server should reply with one= >>> bitmap at a time. >>> >>> Would this work for you? >> I think that would be much better, yes, though I'd suggest the >> bitmap had an ID other than a number 0..15 so other people >> can use it too. >> > bitmap requires to negotiate granularity which is > not that easy thing. >=20 > If we have different granularities for 'dirty' and 'allocated' > bitmaps and we can report this using this proto and > can not do this cleanly with bitmap approach assuming > that we will add 'NBD_STATE_DIRTY_DEALLOCATED' (0x2) state I'm not sure what you are trying to propose adding here. 'state' is a bitmap - it is either a representation of two bits of information (NBD_CMD_FLAG_DIRTY was clear, so state is the bitwise OR of NBD_STATE_HOLE and NBD_STATE_ZERO), or the representation of one bit of information (NBD_CMD_FLAG_DIRTY was set, so state is the bitwise OR of NBD_STATE_CLEAN). I'm not sure where you are reading into this that granularity has to be negotiated. The client never mentions granularity; and the server is perfectly free to report data in descriptors as large or as small as it wants (although I did document that the server SHOULD stick to descriptors that are at least 512 bytes at a time, and SHOULD coalese descriptors so that two consecutive descriptors have distinct state value= s). Whether something is allocated or not has no direct bearing on whether it is dirty or not; and it is feasible that a server could report the act of NBD_CMD_TRIM as causing a portion of the file to become dirty. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --2RLNjGSW96FcrjFKQl0q4XWFibqn2mjTX 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/ iQEcBAEBCAAGBQJXAtJ6AAoJEKeha0olJ0Nqk+4H/1/vaLEwrbPwGiGsieefyJSv qK/hGENBNE8OUapy738SXhTNjEZvX5SaE74N57p36sUjodJKIydb/m0ycMej4dbw LepIShz6o6OGkyxq8iwVC1TPENHChcPJJw41KaIzsmNfzzksO1bIFDWSDnum0MH/ 8MV3YXIqLbZwuGKMzW0nt8BRF9+LiwgLEd90gVbcHbaGbOF8553yJoSd7ZjEB0OS S2un3dsBh6QTsnt6n2/gQImsH7gD1NicRpPYmGEvorfSictR7AsGVuTyM7gfzZfD hh/xbGONLUe4KZigRmL96HHMHskae8OowdO1hVkQljgM4skgW8QW82N64n9X+/8= =c2Ot -----END PGP SIGNATURE----- --2RLNjGSW96FcrjFKQl0q4XWFibqn2mjTX--