From: Wouter Verhelst <w@uter.be>
To: Eric Blake <eblake@redhat.com>
Cc: nbd-general@lists.sourceforge.net, Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org, Pavel Borzenkov <pborzenkov@virtuozzo.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Markus Pargmann <mpa@pengutronix.de>,
"Denis V. Lunev" <den@openvz.org>
Subject: Re: [Qemu-devel] [Nbd] [PATCH v2] doc: Add NBD_CMD_BLOCK_STATUS extension
Date: Tue, 5 Apr 2016 22:50:51 +0200 [thread overview]
Message-ID: <20160405205051.GC13913@grep.be> (raw)
In-Reply-To: <5703C829.8070306@redhat.com>
On Tue, Apr 05, 2016 at 08:14:01AM -0600, Eric Blake wrote:
> On 04/05/2016 03:24 AM, Markus Pargmann wrote:
>
> >> + requested.
> >> +
> >> + The client SHOULD NOT read from an area that has both
> >> + `NBD_STATE_HOLE` set and `NBD_STATE_ZERO` clear.
> >
> > Why not? If we don't execute CMD_BLOCK_STATUS we wouldn't know about the
> > situation and would simply read directly. To fulfill this statement we
> > would need to receive the block status before every read operation.
>
> Because we already state that for NBD_CMD_TRIM, the client SHOULD NOT
> read an area where a trim was requested without an intervening write,
Actually, we state that a client SHOULD NOT *make any assumption* about
the state (emphasis added). There's a difference.
If the client wants to write, there is no problem (but he'll probably
get garbage).
[...]
> > Also something that is kind of missing from the document so far is
> > concurrency with other NBD clients. Certainly most users do not use NBD
> > for concurrent access to the backend storage. But for example the
> > sentence above ignores the fact that another client may work on the
> > backend and that the state may change after some time so that it may
> > still be necessary to read from an area with NBD_STATE_HOLE and
> > NBD_STATE_ZERO set.
>
> That's missing from NBD in general, and I don't think this is the patch
> to add it. We already have concurrency with self issues, because NBD
> server can handle requests out of order (within the bounds of FLUSH and
> FUA modifiers).
I don't think NBD *needs* to add much in the way of concurrency, other
than write barriers etc; but having an explicit message "some other
process just modified offset X length Y" seems out of scope for NBD.
> > Also it is uncertain if these status bits may change over time through
> > reorganization of backend storage, for example holes may be removed in
> > the backend and so on. Is it safe to cache this stuff?
>
> If the client is the only thing modifying the drive, maybe we want to
> make that additional constraint on the server. But how best to word it,
> or is it too tight of a specification?
I think it's perfectly fine for the protocol to assume in general that
the client is the only writer, and that no other writers are
concurrently accessing the same device. Anything else would make the
protocol much more complex; and one of the features of NBD is, I think,
the fact that the protocol is not *too* complex.
--
< 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
next prev parent reply other threads:[~2016-04-05 20:51 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-04 16:39 [Qemu-devel] [PATCH v2] doc: Add NBD_CMD_BLOCK_STATUS extension Eric Blake
2016-04-04 18:06 ` [Qemu-devel] [Nbd] " Alex Bligh
2016-04-04 19:34 ` Eric Blake
2016-04-04 19:54 ` Denis V. Lunev
2016-04-04 20:03 ` Alex Bligh
2016-04-04 20:08 ` Denis V. Lunev
2016-04-04 20:34 ` Eric Blake
2016-04-04 21:06 ` Denis V. Lunev
2016-04-04 21:12 ` Alex Bligh
2016-04-05 14:15 ` Paolo Bonzini
2016-04-05 15:01 ` Alex Bligh
2016-04-05 15:23 ` Paolo Bonzini
2016-04-05 15:27 ` Alex Bligh
2016-04-05 15:31 ` Paolo Bonzini
2016-04-04 23:08 ` Wouter Verhelst
2016-04-04 23:32 ` Eric Blake
2016-04-05 7:16 ` Wouter Verhelst
2016-04-05 21:44 ` Wouter Verhelst
2016-04-05 7:13 ` Alex Bligh
2016-04-04 19:58 ` Alex Bligh
2016-04-04 20:04 ` Denis V. Lunev
2016-04-04 20:08 ` Alex Bligh
2016-04-04 20:13 ` Denis V. Lunev
2016-04-04 20:15 ` Alex Bligh
2016-04-04 20:27 ` Denis V. Lunev
2016-04-04 20:45 ` Eric Blake
2016-04-04 21:04 ` Denis V. Lunev
2016-04-04 21:12 ` Alex Bligh
2016-04-04 21:17 ` Eric Blake
2016-04-04 21:27 ` Denis V. Lunev
2016-04-04 20:26 ` Eric Blake
2016-04-04 21:07 ` Alex Bligh
2016-04-04 21:25 ` Eric Blake
2016-04-04 22:06 ` Alex Bligh
2016-04-04 20:22 ` Eric Blake
2016-04-05 13:38 ` Paolo Bonzini
2016-04-04 22:40 ` Wouter Verhelst
2016-04-04 23:03 ` Eric Blake
2016-04-05 13:41 ` Paolo Bonzini
2016-04-06 5:57 ` Denis V. Lunev
2016-04-06 14:08 ` Eric Blake
2016-04-05 4:05 ` [Qemu-devel] " Kevin Wolf
2016-04-05 13:43 ` Paolo Bonzini
2016-04-07 10:38 ` Vladimir Sementsov-Ogievskiy
2016-04-07 16:10 ` Eric Blake
2016-04-07 16:21 ` [Qemu-devel] [Nbd] " Alex Bligh
2016-04-08 11:35 ` [Qemu-devel] " Kevin Wolf
2016-04-09 9:08 ` [Qemu-devel] [Nbd] " Wouter Verhelst
2016-04-13 12:38 ` [Qemu-devel] " Pavel Borzenkov
2016-04-13 14:40 ` Eric Blake
2016-04-07 15:35 ` Pavel Borzenkov
2016-04-07 15:43 ` Paolo Bonzini
2016-04-05 8:51 ` Stefan Hajnoczi
2016-04-05 9:24 ` [Qemu-devel] [Nbd] " Markus Pargmann
2016-04-05 13:50 ` Paolo Bonzini
2016-04-11 5:58 ` Markus Pargmann
2016-04-05 14:14 ` Eric Blake
2016-04-05 20:50 ` Wouter Verhelst [this message]
2016-04-11 6:07 ` Markus Pargmann
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=20160405205051.GC13913@grep.be \
--to=w@uter.be \
--cc=den@openvz.org \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mpa@pengutronix.de \
--cc=nbd-general@lists.sourceforge.net \
--cc=pbonzini@redhat.com \
--cc=pborzenkov@virtuozzo.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).