All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	Alex Bligh <alex@alex.org.uk>, Wouter Verheist <w@uter.be>,
	nbd-general@lists.sourceforge.net
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, Pavel Borzenkov <pborzenkov@virtuozzo.com>,
	stefanha@redhat.com, "Denis V . Lunev" <den@openvz.org>,
	Markus Pargmann <mpa@pengutronix.de>,
	Paolo Bonzini <pbonzini@redhat.com>, John Snow <jsnow@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] Further tidy-up on block status
Date: Tue, 27 Dec 2016 09:56:29 -0600	[thread overview]
Message-ID: <ec385492-c0a5-63cb-97b5-8105823e6add@redhat.com> (raw)
In-Reply-To: <71d6f278-be19-eaeb-7277-c3e6e4512e67@virtuozzo.com>

[-- Attachment #1: Type: text/plain, Size: 2920 bytes --]

On 12/27/2016 08:09 AM, Vladimir Sementsov-Ogievskiy wrote:
> A bit out of topic, but...
> 
>> structured replies via `NBD_OPT_STRUCTURED_REPLY`.  Conversely, if
>> structured replies are negotiated, the server MUST use a
>> structured reply for any response with a payload, and MUST NOT use
>> a simple reply for `NBD_CMD_READ` (even for the case of an early
>> `EINVAL` due to bad flags), but MAY use either a simple reply or a
>> structured reply to all other requests.
> 
> What was the reason for it? Why not to negotiate forced structured read
> separately?

Because the whole reason we (want to) introduce structured replies IS to
fix the inability to do a partial read or an efficient read of zeroes.
The fact that structured reads make other extensions possible is icing
on the cake, but if you are going to implement structured replies at
all, you might as well make reads do it (since reads are mandatory,
while all other commands that utilize structured replies are optional).

> Actually, this spec forces any server, which wants to
> implement structured reply implement structured read too. But what if it
> don't want to? If it only wants to implement BLOCK_STATUS?

We intentionally do not want to permit such a server. Any server that
wants to implement BLOCK_STATUS must also implement structured reads.

> 
> So, what about changing it, to allow BLOCK_STATUS (or other future
> structured replies) without structured read? Structured read is good
> only for sparse formats,

Not true - it is also good for error recovery even on non-sparse
exports.  The existing read command is flawed in that it cannot be
implemented with partial read support - once the server has started
sending data, it MUST finish sending the number of bytes requested by
the client, which means the server MUST either buffer the read up front
(to ensure no read error is possible once the data sending is started),
or MUST disconnect if a read error is detected partway through.  With
structured reads, you can implement much more efficient servers that
start sending the reply right away without buffering, but which can
still error out on a read error partway through.

> when BLOCK_STATUS is more global. I understand,
> that servers may implement simple (and useless) one-chunk structured
> read, but I think that it is better to fix the spec, to not provoke
> servers use such workaround.

To date, we don't know of ANY servers that implement structured replies
at all, whether for structured reads or for BLOCK_STATUS.  I'm working
on qemu patches to make qemu implement both, and it will serve as an
example of how easy or hard it is to implement things.  But I see NO
reason to weaken the spec to allow structured BLOCK_STATUS without
structured reads.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2016-12-27 15:56 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-14 15:08 [Qemu-devel] [PATCH] Further tidy-up on block status Alex Bligh
2016-12-14 16:25 ` Vladimir Sementsov-Ogievskiy
2016-12-14 16:38   ` Alex Bligh
2016-12-14 17:05     ` Vladimir Sementsov-Ogievskiy
2016-12-14 17:36       ` Alex Bligh
2016-12-14 17:55         ` Vladimir Sementsov-Ogievskiy
2016-12-14 18:13           ` [Qemu-devel] [Nbd] " Wouter Verhelst
2016-12-14 18:18             ` Alex Bligh
2016-12-14 18:49               ` Wouter Verhelst
2016-12-14 19:01                 ` Alex Bligh
2016-12-14 20:10                   ` Wouter Verhelst
2016-12-26 15:57                   ` Vladimir Sementsov-Ogievskiy
2016-12-29 16:08                     ` Alex Bligh
2016-12-29 16:35                       ` Vladimir Sementsov-Ogievskiy
2016-12-14 18:51               ` Alex Bligh
2016-12-14 20:18                 ` Wouter Verhelst
2016-12-15 10:04                   ` Alex Bligh
2016-12-15 15:03                     ` Wouter Verhelst
2016-12-15 16:32                       ` Alex Bligh
2016-12-15 16:49                         ` Wouter Verhelst
2016-12-15 17:34                           ` Alex Bligh
2016-12-16 15:52                             ` Wouter Verhelst
2016-12-16 16:25                               ` Alex Bligh
2016-12-17  8:34                                 ` Wouter Verhelst
2016-12-17  9:41                                   ` Alex Bligh
2016-12-14 18:17           ` [Qemu-devel] " Alex Bligh
2016-12-26 14:52             ` Vladimir Sementsov-Ogievskiy
2016-12-28  0:18               ` [Qemu-devel] [Nbd] " Wouter Verhelst
2016-12-29 16:04                 ` Alex Bligh
2016-12-29 16:28                   ` Vladimir Sementsov-Ogievskiy
2016-12-14 16:58 ` [Qemu-devel] " Eric Blake
2016-12-14 17:03   ` Alex Bligh
2016-12-14 17:09 ` [Qemu-devel] [Nbd] " Wouter Verhelst
2016-12-14 17:33   ` Vladimir Sementsov-Ogievskiy
2016-12-14 17:39   ` Alex Bligh
2016-12-14 20:47   ` John Snow
2018-05-03 16:18   ` Eric Blake
2018-05-03 17:26   ` Eric Blake
2018-05-04  6:40     ` Wouter Verhelst
2016-12-27 14:09 ` [Qemu-devel] " Vladimir Sementsov-Ogievskiy
2016-12-27 15:56   ` Eric Blake [this message]
2016-12-29 16:14   ` Alex Bligh
2017-01-11 15:31 ` Vladimir Sementsov-Ogievskiy
2017-01-11 19:00   ` Alex Bligh
2017-01-12  7:05     ` Vladimir Sementsov-Ogievskiy
2017-01-12 13:11       ` Alex Bligh
2017-01-13  9:48         ` Vladimir Sementsov-Ogievskiy
2017-01-13 10:29           ` Alex Bligh
2017-01-16 12:26             ` Vladimir Sementsov-Ogievskiy
2017-01-12 11:43 ` Vladimir Sementsov-Ogievskiy
2017-01-12 13:16   ` Alex Bligh
2017-01-20 17:04 ` Vladimir Sementsov-Ogievskiy
2017-01-20 18:00   ` Alex Bligh
2017-01-20 19:35     ` Eric Blake
2017-01-21 12:25       ` [Qemu-devel] [Nbd] " Wouter Verhelst
2018-02-16 12:35 ` Eric Blake
2018-02-16 13:53   ` Vladimir Sementsov-Ogievskiy
2018-02-16 16:10     ` Eric Blake
2018-02-28 13:08       ` Wouter Verhelst
2018-02-28 20:26         ` Eric Blake
2018-02-28 20:29           ` Eric Blake
2018-03-01  9:54         ` Vladimir Sementsov-Ogievskiy

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=ec385492-c0a5-63cb-97b5-8105823e6add@redhat.com \
    --to=eblake@redhat.com \
    --cc=alex@alex.org.uk \
    --cc=den@openvz.org \
    --cc=jsnow@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 \
    --cc=vsementsov@virtuozzo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.