[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/20] nbd/server: Allow LIST_META_CONTEXT without STRUCTURED_REPL
From: |
Eric Blake |
Subject: |
[PULL 13/20] nbd/server: Allow LIST_META_CONTEXT without STRUCTURED_REPLY |
Date: |
Mon, 27 Sep 2021 16:55:38 -0500 |
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>
Message-Id: <20210907173505.1499709-1-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
nbd/server.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nbd/server.c b/nbd/server.c
index 3927f7789dcf..6d03e8a4b436 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
- [PULL 02/20] block/io: bring request check to bdrv_co_(read, write)v_vmstate, (continued)
- [PULL 02/20] block/io: bring request check to bdrv_co_(read, write)v_vmstate, Eric Blake, 2021/09/27
- [PULL 03/20] qcow2: check request on vmstate save/load path, Eric Blake, 2021/09/27
- [PULL 05/20] block: use int64_t instead of uint64_t in driver write handlers, Eric Blake, 2021/09/27
- [PULL 06/20] block: use int64_t instead of uint64_t in copy_range driver handlers, Eric Blake, 2021/09/27
- [PULL 10/20] block: make BlockLimits::max_pdiscard 64bit, Eric Blake, 2021/09/27
- [PULL 11/20] block: use int64_t instead of int in driver discard handlers, Eric Blake, 2021/09/27
- [PULL 04/20] block: use int64_t instead of uint64_t in driver read handlers, Eric Blake, 2021/09/27
- [PULL 07/20] block: make BlockLimits::max_pwrite_zeroes 64bit, Eric Blake, 2021/09/27
- [PULL 09/20] block/io: allow 64bit write-zeroes requests, Eric Blake, 2021/09/27
- [PULL 12/20] block/io: allow 64bit discard requests, Eric Blake, 2021/09/27
- [PULL 13/20] nbd/server: Allow LIST_META_CONTEXT without STRUCTURED_REPLY,
Eric Blake <=
- [PULL 15/20] block/nbd: nbd_channel_error() shutdown channel unconditionally, Eric Blake, 2021/09/27
- [PULL 18/20] block/nbd: drop connection_co, Eric Blake, 2021/09/27
- [PULL 17/20] block/nbd: refactor nbd_recv_coroutines_wake_all(), Eric Blake, 2021/09/27
- [PULL 08/20] block: use int64_t instead of int in driver write_zeroes handlers, Eric Blake, 2021/09/27
- [PULL 14/20] nbd/client-connection: nbd_co_establish_connection(): fix non set errp, Eric Blake, 2021/09/27
- [PULL 16/20] block/nbd: move nbd_recv_coroutines_wake_all() up, Eric Blake, 2021/09/27
- [PULL 19/20] block/nbd: check that received handle is valid, Eric Blake, 2021/09/27
- [PULL 20/20] nbd/server: Add --selinux-label option, Eric Blake, 2021/09/27
- Re: [PULL 00/20] NBD patches through 2021-09-27, Peter Maydell, 2021/09/29