From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anBF4-0002Yo-KU for qemu-devel@nongnu.org; Mon, 04 Apr 2016 16:36:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anBF1-0004lS-De for qemu-devel@nongnu.org; Mon, 04 Apr 2016 16:36:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anBF1-0004kw-5i for qemu-devel@nongnu.org; Mon, 04 Apr 2016 16:36:55 -0400 References: <1458742562-30624-1-git-send-email-den@openvz.org> <1458742562-30624-3-git-send-email-den@openvz.org> <5702CB91.7090807@openvz.org> From: Eric Blake Message-ID: <5702D064.9000405@redhat.com> Date: Mon, 4 Apr 2016 14:36:52 -0600 MIME-Version: 1.0 In-Reply-To: <5702CB91.7090807@openvz.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jCkD2QS6JWKaNoDI9LQxRSvlQThfsuIh3" Subject: Re: [Qemu-devel] [Nbd] [PATCH 2/2] NBD proto: add GET_LBA_STATUS 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 , Paolo Bonzini , Pavel Borzenkov , Hajnoczi , Wouter Verhelst This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --jCkD2QS6JWKaNoDI9LQxRSvlQThfsuIh3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/04/2016 02:16 PM, Denis V. Lunev wrote: >> + The following request types are currently defined for the command= : >> + >> + 1. Block provisioning state >> + >> + Upon receiving an `NBD_CMD_GET_LBA_STATUS` command with command f= lags >> + field set to `NBD_FLAG_GET_ALLOCATED` (0x0), the server MUST retu= rn >> + the provisioning state of the device. The following provisionnig = states >> + are defined for the command: >> + >> + - `NBD_STATE_ALLOCATED` (0x0), LBA extent is present on the blo= ck device; >> + - `NBD_STATE_ZEROED` (0x1), LBA extent is present on the block = device >> + and contains zeroes; >> + - `NBD_STATE_DEALLOCATED` (0x2), LBA extent is not present on t= he >> + block device. A client MUST NOT make any assumptions about th= e >> + contents of the extent. > we can add 'NBD_STATE_DIRTY_DEALLOCATED' (0x2) here as additional hint No, DEALLOCATED and HOLE are the same thing, and we really want the status to be a bitwise-OR of flags (bit 0: is it allocated or deallocated. bit 1: is it unknown content or all 0), rather than a set of 3 states, since it really is possible to have all four combinations of those two orthognal status information. That was one of the topics already hashed out in the v1 conversation, and fixed in v2. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --jCkD2QS6JWKaNoDI9LQxRSvlQThfsuIh3 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/ iQEcBAEBCAAGBQJXAtBkAAoJEKeha0olJ0NqHicIAKyG5Bfq73Mr/xUak5mjPaOe JfhKc7EynpLp0BL1CtUPjmdv6GeyjY4VZIfASEz4TFtGejdogEwZjyiIsj1WM1BN jiyjdYpZju7HLwYVKRXDaahRgBXRXV+Q33NIMIRsj7HXuvQQ5cJ0z1b8YC8Dt9bm jFEJaCDAbk0Xkn6F/8/ijt+zkDtggCi3zIiDJJ72IbbkGUCuEuaeExVXbK8WL3n4 3FDPafP2lT/2wqItZMPF+c2we20DgyU6XFTS0lEZw0Yw2Dg7Mg2uVkFuNqzVgczr coQVKkh5aYIQrIKQ/C8ApxGW2icr8uaibofkN7jjo6Kf37RUwYch4EKJn9QMSwo= =AJPK -----END PGP SIGNATURE----- --jCkD2QS6JWKaNoDI9LQxRSvlQThfsuIh3--