From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj7aE-0006v5-1h for qemu-devel@nongnu.org; Thu, 24 Mar 2016 11:54:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aj7aD-00046j-4G for qemu-devel@nongnu.org; Thu, 24 Mar 2016 11:54:01 -0400 Received: from barbershop.grep.be ([89.106.240.122]:52744) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj7aC-00046d-UE for qemu-devel@nongnu.org; Thu, 24 Mar 2016 11:54:01 -0400 Date: Thu, 24 Mar 2016 16:53:19 +0100 From: Wouter Verhelst Message-ID: <20160324155319.GK2870@grep.be> 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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gdTfX7fkYsEEjebm" Content-Disposition: inline In-Reply-To: <56F408D6.2020002@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: Paolo Bonzini Cc: nbd-general@lists.sourceforge.net, Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi , "Denis V. Lunev" --gdTfX7fkYsEEjebm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. 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") I like the idea of having zero be the "sensible" default, although I'm quite unable to come up with a better name myself. -- < ron> I mean, the main *practical* problem with C++, is there's like a dozen people in the world who think they really understand all of its rules, and pretty much all of them are just lying to themselves too. -- #debian-devel, OFTC, 2016-02-12 --gdTfX7fkYsEEjebm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJW9A1vAAoJEMKUD5Ub3wqd0W0QAOw5jI9ZZS1lgDr9cSSUdw3n 5MyFDw8awQI78Hy/erLG+rWMNqKMa0a7hXFiSdmCVGr7+lI0groB69J54XjKLI+p ImjUa78X84gPfxo73kw88t8WZMb2HBTjfk0fhJDTUn2ilWxNG1p/sbdiFSnVG1Sp dZ1oAYNokcCFH5pQ1qEZAYesdYkUz2hNo+O0s8zQ2NwH9/KHJwS+wdUbdizCmx5D H3qTzgScdR+oiuj4a7vvTxJLHydVssZDTC5B12VsiEXUMvEjUMc2QhfRqRkbB/KU wh9II2LZ8oZsZyu1rm2oOGYQ8hDluxExHrnOxX5Q1tcmt5IdNRFlq5Vwrj3mKg82 VXDE9mslr4BdVNyeklt8/KC84pRL1ZyGCziweHyIv6p1VlTlgDASU1U7HEK1CCq3 3rGvmpLwAdK0+vHMJSA4/1uhPCwOnWsaxZqsq4KltwhQfGxiljSZaGTgiv3Ha29n 8d+Oll4NPlriYiCwOWvATfO6tD8xG1W8/Ea0GSQdgVZ3oEgfin1/trRs6lxtJ2Uk niSNfQYqWwZCfvZI0QzJpf2wpe5voSPG4kQU/8DZ4YoLCA+u3yZSsW9vPHYoTZdQ VxXHC//m/7ZzW1g7DbMxHzmcv+wYrXtncV1Rd5/qxt659kKaGxr2qba64gZJF8kf 7uFb5AHCrMJHLQQiQp/8 =FDa6 -----END PGP SIGNATURE----- --gdTfX7fkYsEEjebm--