All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nbd/server: Allow LIST_META_CONTEXT without STRUCTURED_REPLY
@ 2021-09-07 17:35 Eric Blake
  2021-09-14 14:19 ` Vladimir Sementsov-Ogievskiy
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Blake @ 2021-09-07 17:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: vsementsov, qemu-block

The NBD protocol just relaxed the requirements on
NBD_OPT_LIST_META_CONTEXT:

https://github.com/NetworkBlockDevice/nbd/commit/13a4e33a87

Since listing is not stateful (unlike SET_META_CONTEXT), we don't care
if a client asks for meta contexts without first requesting structured
replies.  Well-behaved clients will still ask for structured reply
first (if for no other reason than for back-compat to older servers),
but that's no reason to avoid this change.

Signed-off-by: Eric Blake <eblake@redhat.com>
---
 nbd/server.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nbd/server.c b/nbd/server.c
index 1646796a4798..bd635cf8ffd1 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -980,7 +980,7 @@ static int nbd_negotiate_meta_queries(NBDClient *client,
     size_t i;
     size_t count = 0;

-    if (!client->structured_reply) {
+    if (client->opt == NBD_OPT_SET_META_CONTEXT && !client->structured_reply) {
         return nbd_opt_invalid(client, errp,
                                "request option '%s' when structured reply "
                                "is not negotiated",
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] nbd/server: Allow LIST_META_CONTEXT without STRUCTURED_REPLY
  2021-09-07 17:35 [PATCH] nbd/server: Allow LIST_META_CONTEXT without STRUCTURED_REPLY Eric Blake
@ 2021-09-14 14:19 ` Vladimir Sementsov-Ogievskiy
  2021-09-24 19:19   ` Eric Blake
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2021-09-14 14:19 UTC (permalink / raw)
  To: Eric Blake, qemu-devel; +Cc: qemu-block

07.09.2021 20:35, Eric Blake wrote:
> The NBD protocol just relaxed the requirements on
> NBD_OPT_LIST_META_CONTEXT:
> 
> https://github.com/NetworkBlockDevice/nbd/commit/13a4e33a87
> 
> Since listing is not stateful (unlike SET_META_CONTEXT), we don't care
> if a client asks for meta contexts without first requesting structured
> replies.  Well-behaved clients will still ask for structured reply
> first (if for no other reason than for back-compat to older servers),
> but that's no reason to avoid this change.
> 
> Signed-off-by: Eric Blake<eblake@redhat.com>

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

-- 
Best regards,
Vladimir


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] nbd/server: Allow LIST_META_CONTEXT without STRUCTURED_REPLY
  2021-09-14 14:19 ` Vladimir Sementsov-Ogievskiy
@ 2021-09-24 19:19   ` Eric Blake
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Blake @ 2021-09-24 19:19 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy; +Cc: qemu-devel, qemu-block

On Tue, Sep 14, 2021 at 05:19:42PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> 07.09.2021 20:35, Eric Blake wrote:
> > The NBD protocol just relaxed the requirements on
> > NBD_OPT_LIST_META_CONTEXT:
> > 
> > https://github.com/NetworkBlockDevice/nbd/commit/13a4e33a87
> > 
> > Since listing is not stateful (unlike SET_META_CONTEXT), we don't care
> > if a client asks for meta contexts without first requesting structured
> > replies.  Well-behaved clients will still ask for structured reply
> > first (if for no other reason than for back-compat to older servers),
> > but that's no reason to avoid this change.
> > 
> > Signed-off-by: Eric Blake<eblake@redhat.com>
> 
> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

Thanks; queuing this one through my NBD tree.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-24 19:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07 17:35 [PATCH] nbd/server: Allow LIST_META_CONTEXT without STRUCTURED_REPLY Eric Blake
2021-09-14 14:19 ` Vladimir Sementsov-Ogievskiy
2021-09-24 19:19   ` Eric Blake

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.