From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj8QO-0002lg-VC for qemu-devel@nongnu.org; Thu, 24 Mar 2016 12:48:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aj8QL-0003ow-M5 for qemu-devel@nongnu.org; Thu, 24 Mar 2016 12:47:56 -0400 Received: from barbershop.grep.be ([89.106.240.122]:43986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj8QL-0003og-Fv for qemu-devel@nongnu.org; Thu, 24 Mar 2016 12:47:53 -0400 Date: Thu, 24 Mar 2016 17:47:47 +0100 From: Wouter Verhelst Message-ID: <20160324164747.GA2902@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> <20160324155319.GK2870@grep.be> <56F4101D.7030603@redhat.com> <20160324160747.GF4310@noname.redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2fHTh5uZTiUOsy+g" Content-Disposition: inline In-Reply-To: <20160324160747.GF4310@noname.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: Kevin Wolf Cc: nbd-general@lists.sourceforge.net, qemu-devel@nongnu.org, Stefan Hajnoczi , "Denis V. Lunev" , Paolo Bonzini --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 24, 2016 at 05:07:47PM +0100, Kevin Wolf wrote: > 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 devi= ce > > >>>> NBD_STATE_ZERO (0x2), LBA extent will read as zeroes > > >>> > > >>> Should we flip the sense and call this NBD_STATE_UNALLOCATED (0 mea= ns > > >>> 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 mann= er, > > > 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. >=20 > How about NBD_STATE_HOLE? Both will work, although I like NBD_STATE_TRIM slightly better because it indeed nicely references NBD_CMD_TRIM. However, I also think it should then be made clear that issuing NBD_CMD_TRIM doesn't *require* that GET_BLOCK returns NBD_STATE_TRIM for that region if the backend storage format dosn't support that, to avoid confusion later on. --=20 < ron> I mean, the main *practical* problem with C++, is there's like a doz= en people in the world who think they really understand all of its rule= s, and pretty much all of them are just lying to themselves too. -- #debian-devel, OFTC, 2016-02-12 --2fHTh5uZTiUOsy+g Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJW9BozAAoJEMKUD5Ub3wqd66YQAKgB0AOlkqW7+vauLp5dCthu AmxM8hpc1t67UTiKMwLQNYaVX1rjzfzsaynhFoxr5sQO2ktspRyKEuulDhmMCA47 gTTUpAeYjrIb+8jXGs437FLmb+8LVzjiF+9BxsFGMKPxzxPdP7y2q7Q54zo6Aa5d g34nJIGZ8h7JG1XsmPxsY8ItAflZAnkgrsQmhZFOgVfEJpLoWS1rkhmIk7qxxzjU lgMjs1Zwg+HNAakMaO8PYa+eOXKJyN2IejEj8xsiwO7f5CGStXKgok+eSfiSCIop PbmYpZHeKZc93C7Bn4Uu/V9r+StvyuKlOQvaxMU73dH0fyvwocMMMcAnexxOwCAc dZsbMAOzBCG96Z4BQ8SbhbZBIDmxgpF45dRhyCnU83WEKo0/ueu4bj+6OeOil1Zb MCjvOiVDl4JZ7nFZ9vu20QLskzpHpqGlxBS1TmdGziim5W5d9pd0ZDOIyaB8UG+z fEqiiaKwNJPsU/mN6H20BiOlz2MH+0GjCtMjSa9L1bkUNXXFOD8CSz3NTXbHjsHR XgeVj6+7IDWlIpxR7kytHDWDS57aCxkd/h7oiTOB0S2XPtv3WO0BsKOxwm7qQ3jM 1wZTaFIR/FKyVFxnYLr6REboAK3zB3SHKz3ohlJw0Sp4v1JXyWHjMrRUWVtFhkMY msRCdD344yRuu6vQtKtr =dLDq -----END PGP SIGNATURE----- --2fHTh5uZTiUOsy+g--