From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj7ng-0002DG-EG for qemu-devel@nongnu.org; Thu, 24 Mar 2016 12:07:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aj7nb-0001VG-Ed for qemu-devel@nongnu.org; Thu, 24 Mar 2016 12:07:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj7nb-0001VA-8f for qemu-devel@nongnu.org; Thu, 24 Mar 2016 12:07:51 -0400 Date: Thu, 24 Mar 2016 17:07:47 +0100 From: Kevin Wolf Message-ID: <20160324160747.GF4310@noname.redhat.com> 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> <56F4101D.7030603@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="m51xatjYGsM+13rf" Content-Disposition: inline In-Reply-To: <56F4101D.7030603@redhat.com> 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: Eric Blake Cc: nbd-general@lists.sourceforge.net, qemu-devel@nongnu.org, Paolo Bonzini , Stefan Hajnoczi , Wouter Verhelst , "Denis V. Lunev" --m51xatjYGsM+13rf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am 24.03.2016 um 17:04 hat Eric Blake geschrieben: > 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. >=20 > 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. How about NBD_STATE_HOLE? Kevin --m51xatjYGsM+13rf Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJW9BDTAAoJEH8JsnLIjy/WjhIP/1WUQSZ3RIgSjA7ieaITpOth NJ7thyFgjPrqZ/KjSB9HWUSW+q8VRqcT/nR0fRYjOtVtNL3wP4XJ8DL1/oSi1akj kZmcfGhhq4FLMJ/25cQVfCmYlchASMQkxwg3nuUYeAfKvmnSpniateobQ0h8RNlI TzaxIYrsYp7maLHQK9FoLooY1ztq15xEVB4pOKOp6zI8AAWE95MEOGk8dSE9Aqjh R2MXorMQy8CM44tLb7wpUMBiqh4Q4rH6gwG1Z2OXyPBelKcqlD7UNTNT8Fzaxt6D lmsZHm+ZX7Ddbx3r1m1IV7X1RXyZ/wM5jE7OHIgzKdqO7TSgGgueDW8sDgD3Ux0W evxoOA6v8a83/FL8XXafbLXKPsYJzhbDlTAUBG4nNKxn5eMmifo7gHw2x7AIc3c0 9uIk73gxjpN88vA/RDj6fwFlHcx328hqX4CzYlFJKcpJR2FLHJrR/h0udXsdqMDx blrvoZMGST1xRf2C4U4g6OTu0ZtsnY6Dp+5W0W9HkxgFy6SE2lO7ARGjkdiYv3Lk 8bs6vsJAhfucDWkRgLwi0qUWVe/L6WwvrSUZfgxWbixUgNEDmhoaUMgUiaOPfU5U WB1/xiEm1WPGrjjJoorqjCKfQ3IRCZ1LicPDtPP9T8xpVzg2uE0ncZVpAHIYQoDb zt6gxE+wBOsEFdw6ZbNb =MCTb -----END PGP SIGNATURE----- --m51xatjYGsM+13rf--