From: Kevin Wolf <kwolf@redhat.com>
To: Wouter Verhelst <w@uter.be>
Cc: nbd-general@lists.sourceforge.net, qemu-devel@nongnu.org,
Stefan Hajnoczi <stefanha@redhat.com>,
"Denis V. Lunev" <den@openvz.org>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [Nbd] [PATCH 2/2] NBD proto: add GET_LBA_STATUS extension
Date: Tue, 29 Mar 2016 11:38:35 +0200 [thread overview]
Message-ID: <20160329093835.GB4600@noname.redhat.com> (raw)
In-Reply-To: <20160324164747.GA2902@grep.be>
[-- Attachment #1: Type: text/plain, Size: 2185 bytes --]
Am 24.03.2016 um 17:47 hat Wouter Verhelst geschrieben:
> 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 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.
> > >
> > > 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?
>
> Both will work, although I like NBD_STATE_TRIM slightly better because
> it indeed nicely references NBD_CMD_TRIM.
I just thought that "trim" sounds more like an action than a status, and
while the reason for a hole to exist can be a previous TRIM command,
another option is that it's an area in an image that just has never been
written to. In that case "trim" would be a misnomer.
> 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.
Good point. That might be another reason for not calling the status
"trim".
Kevin
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2016-03-29 9:38 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-23 14:16 [Qemu-devel] [PATCH 0/2] NBD protocol extensions: WRITE_ZEROES and GET_LBA_STATUS Denis V. Lunev
2016-03-23 14:16 ` [Qemu-devel] [PATCH 1/2] NBD proto: add WRITE_ZEROES extension Denis V. Lunev
2016-03-23 15:14 ` Eric Blake
2016-03-23 17:40 ` [Qemu-devel] [Nbd] " Wouter Verhelst
2016-03-24 7:16 ` [Qemu-devel] " Pavel Borzenkov
2016-03-24 7:36 ` [Qemu-devel] [Nbd] " Wouter Verhelst
2016-03-23 17:21 ` Wouter Verhelst
2016-03-24 7:57 ` Pavel Borzenkov
2016-03-24 8:26 ` Wouter Verhelst
2016-03-24 11:35 ` Pavel Borzenkov
2016-03-24 11:37 ` Paolo Bonzini
2016-03-24 12:31 ` Wouter Verhelst
2016-03-24 14:53 ` Eric Blake
2016-03-23 14:16 ` [Qemu-devel] [PATCH 2/2] NBD proto: add GET_LBA_STATUS extension Denis V. Lunev
2016-03-23 16:27 ` Eric Blake
2016-03-24 12:30 ` Pavel Borzenkov
2016-03-24 15:04 ` Eric Blake
2016-03-24 16:36 ` Pavel Borzenkov
2016-03-23 17:58 ` [Qemu-devel] [Nbd] " Wouter Verhelst
2016-03-23 18:14 ` Kevin Wolf
2016-03-24 8:25 ` Pavel Borzenkov
2016-03-24 8:41 ` Wouter Verhelst
2016-03-24 11:36 ` Pavel Borzenkov
2016-03-24 12:32 ` Wouter Verhelst
2016-03-24 8:43 ` Pavel Borzenkov
2016-03-24 9:33 ` Wouter Verhelst
2016-03-24 10:32 ` Alex Bligh
2016-03-24 11:58 ` Paolo Bonzini
2016-03-24 12:17 ` Alex Bligh
2016-03-24 12:32 ` Paolo Bonzini
2016-03-24 13:31 ` Alex Bligh
2016-03-24 13:32 ` Paolo Bonzini
2016-03-24 11:55 ` Paolo Bonzini
2016-03-24 12:43 ` Wouter Verhelst
2016-03-24 15:25 ` Eric Blake
2016-03-24 15:33 ` Paolo Bonzini
2016-03-24 15:53 ` Wouter Verhelst
2016-03-24 16:04 ` Eric Blake
2016-03-24 16:07 ` Kevin Wolf
2016-03-24 16:47 ` Wouter Verhelst
2016-03-29 9:38 ` Kevin Wolf [this message]
2016-03-29 9:53 ` Wouter Verhelst
2016-03-29 10:25 ` Paolo Bonzini
2016-03-24 22:08 ` [Qemu-devel] " Eric Blake
2016-03-25 8:49 ` [Qemu-devel] [Nbd] " Wouter Verhelst
2016-03-25 9:01 ` Alex Bligh
2016-03-28 15:58 ` Eric Blake
2016-04-04 10:32 ` Markus Pargmann
2016-04-04 10:18 ` Markus Pargmann
2016-04-04 16:54 ` Eric Blake
2016-04-04 22:17 ` Wouter Verhelst
2016-04-04 16:40 ` [Qemu-devel] " Eric Blake
2016-04-04 20:16 ` Denis V. Lunev
2016-04-04 20:36 ` [Qemu-devel] [Nbd] " Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160329093835.GB4600@noname.redhat.com \
--to=kwolf@redhat.com \
--cc=den@openvz.org \
--cc=nbd-general@lists.sourceforge.net \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=w@uter.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).