From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj7kk-000713-3Q for qemu-devel@nongnu.org; Thu, 24 Mar 2016 12:04:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aj7ke-0000o2-7H for qemu-devel@nongnu.org; Thu, 24 Mar 2016 12:04:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33295) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj7ke-0000ny-1m for qemu-devel@nongnu.org; Thu, 24 Mar 2016 12:04:48 -0400 References: <1458742562-30624-1-git-send-email-den@openvz.org> <1458742562-30624-3-git-send-email-den@openvz.org> <20160323175834.GC2467@grep.be> <56F3D5C7.9070007@redhat.com> <56F406E7.4010207@redhat.com> <56F408D6.2020002@redhat.com> <20160324155319.GK2870@grep.be> From: Eric Blake Message-ID: <56F4101D.7030603@redhat.com> Date: Thu, 24 Mar 2016 10:04:45 -0600 MIME-Version: 1.0 In-Reply-To: <20160324155319.GK2870@grep.be> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="I4BUUcOboJ1sKPuPGfRtMr4T4MLnHQ7r2" 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: Wouter Verhelst , Paolo Bonzini Cc: nbd-general@lists.sourceforge.net, "Denis V. Lunev" , Stefan Hajnoczi , qemu-devel@nongnu.org, Kevin Wolf This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --I4BUUcOboJ1sKPuPGfRtMr4T4MLnHQ7r2 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/24/2016 09:53 AM, Wouter Verhelst wrote: > On Thu, Mar 24, 2016 at 04:33:42PM +0100, Paolo Bonzini wrote: >> On 24/03/2016 16:25, Eric Blake wrote: >>>> However, let's make these bits, so that >>>> >>>> NBD_STATE_ALLOCATED (0x1), LBA extent is present on the block device= >>>> NBD_STATE_ZERO (0x2), LBA extent will read as zeroes >>> >>> Should we flip the sense and call this NBD_STATE_UNALLOCATED (0 means= >>> allocated, 1 means not present), so that an overall status of 0 is a >>> safe default? >> >> Double negations are evil (and don't work the same in all languages), = so >> I think it's a worse option. >=20 > I agree that a bit which says "unallocated" is confusing in that manner= , > but that just means we need a better name (one that doesn't contain > "un-" or "not") >=20 > I like the idea of having zero be the "sensible" default, although I'm > quite unable to come up with a better name myself. NBD_STATE_TRIM, perhaps? (0 for present, 1 for trimmed or unallocated); matches well that we have NBD_CMD_TRIM for requesting the creation of such a state. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --I4BUUcOboJ1sKPuPGfRtMr4T4MLnHQ7r2 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/ iQEbBAEBCAAGBQJW9BAdAAoJEKeha0olJ0Nqq5sH9ijttW6jS8utfysMZWw6EsSM JH1aT0nomGlBH1ST9sKxE53XzgsYWI5GgwtDqoJcotTJFjT6QATYPhgClnSeZGJ4 kXxZvxHh+XH3sFr4INSIjxp9kwLAhCxwXQ0ScEgEDhgXfySS+7BnYX1ZnInvC2jV YurvrniwmxEdcO46nPP2QLdJh3Zy1+keQejVGdcxdL5uhcwyRx83d+WD0UO71BKQ br8HawfMMYzhvfYhhMv4NxiBg4yddh1s/RBUDH/e/rmyCQodtPCyIM4UgHmrCeOR y+SxTqGgHCy6+hnWii2IIFkEethxmNzxPWgTFuwZhfTMnRjwDnEcrTeu77p4dQ== =QAbw -----END PGP SIGNATURE----- --I4BUUcOboJ1sKPuPGfRtMr4T4MLnHQ7r2--