From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: Eric Blake <eblake@redhat.com>, nbd@other.debian.org
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
libguestfs@redhat.com, nsoffer@redhat.com
Subject: Re: [PATCH] spec: Add NBD_OPT_EXTENDED_HEADERS
Date: Fri, 10 Dec 2021 21:16:12 +0300 [thread overview]
Message-ID: <60a56a8d-87fc-dbaf-0ebf-cd551ce13f14@virtuozzo.com> (raw)
In-Reply-To: <20211203231434.3900824-1-eblake@redhat.com>
04.12.2021 02:14, Eric Blake wrote:
> Add a new negotiation feature where the client and server agree to use
> larger packet headers on every packet sent during transmission phase.
> This has two purposes: first, it makes it possible to perform
> operations like trim, write zeroes, and block status on more than 2^32
> bytes in a single command; this in turn requires that some structured
> replies from the server also be extended to match. The wording chosen
> here is careful to permit a server to use either flavor in its reply
> (that is, a request less than 32-bits can trigger an extended reply,
> and conversely a request larger than 32-bits can trigger a compact
> reply).
About this.. Isn't it too permissive?
I think that actually having to very similar ways to do the same thing is usually a bad design. I think we don't want someone implement the logic, which tries to send 32bit commands/replies for small requests and 64bit command/replies for larger ones? Moreover, you don't allow doing it for commands. So, for symmetry, it may be good to be strict with replies too: in 64bit mode only 64bit replies.
Now we of course have to support old 32bit commands and new 64bit commands. But, may be, we'll want to deprecate 32bit commands at some moment? I'm not sure we can deprecate them in protocol, but we can deprecate them in Qemu at least. And several years later we'll drop old code, keeping only support for 64bit commands. Less code paths, less similar structures, simpler code, I think it worth it.
--
Best regards,
Vladimir
next prev parent reply other threads:[~2021-12-10 18:18 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-03 23:13 RFC for NBD protocol extension: extended headers Eric Blake
2021-12-03 23:14 ` [PATCH] spec: Add NBD_OPT_EXTENDED_HEADERS Eric Blake
2021-12-06 11:40 ` Vladimir Sementsov-Ogievskiy
2021-12-06 23:00 ` Eric Blake
2021-12-07 9:08 ` Vladimir Sementsov-Ogievskiy
2021-12-10 18:05 ` Vladimir Sementsov-Ogievskiy
2021-12-07 16:14 ` Wouter Verhelst
2022-03-22 15:10 ` Eric Blake
2021-12-10 18:16 ` Vladimir Sementsov-Ogievskiy [this message]
2022-03-24 17:31 ` Wouter Verhelst
2022-03-25 0:00 ` Eric Blake
2022-10-04 21:21 ` Eric Blake
2021-12-03 23:15 ` [PATCH 00/14] qemu patches for NBD_OPT_EXTENDED_HEADERS Eric Blake
2021-12-03 23:15 ` [PATCH 01/14] nbd/server: Minor cleanups Eric Blake
2021-12-06 12:03 ` Vladimir Sementsov-Ogievskiy
2021-12-03 23:15 ` [PATCH 02/14] qemu-io: Utilize 64-bit status during map Eric Blake
2021-12-06 12:06 ` Vladimir Sementsov-Ogievskiy
2021-12-03 23:15 ` [PATCH 03/14] qemu-io: Allow larger write zeroes under no fallback Eric Blake
2021-12-06 12:26 ` Vladimir Sementsov-Ogievskiy
2021-12-03 23:15 ` [PATCH 04/14] nbd/client: Add safety check on chunk payload length Eric Blake
2021-12-06 12:33 ` Vladimir Sementsov-Ogievskiy
2021-12-03 23:15 ` [PATCH 05/14] nbd/server: Prepare for alternate-size headers Eric Blake
2021-12-03 23:15 ` [PATCH 06/14] nbd: Prepare for 64-bit requests Eric Blake
2021-12-03 23:15 ` [PATCH 07/14] nbd: Add types for extended headers Eric Blake
2021-12-03 23:15 ` [PATCH 08/14] nbd/server: Initial support " Eric Blake
2021-12-03 23:15 ` [PATCH 09/14] nbd/server: Support 64-bit block status Eric Blake
2021-12-03 23:15 ` [PATCH 10/14] nbd/client: Initial support for extended headers Eric Blake
2021-12-03 23:15 ` [PATCH 11/14] nbd/client: Accept 64-bit hole chunks Eric Blake
2021-12-03 23:15 ` [PATCH 12/14] nbd/client: Accept 64-bit block status chunks Eric Blake
2021-12-03 23:15 ` [PATCH 13/14] nbd/client: Request extended headers during negotiation Eric Blake
2021-12-03 23:15 ` [PATCH 14/14] do not apply: nbd/server: Send 64-bit hole chunk Eric Blake
2021-12-03 23:17 ` [libnbd PATCH 00/13] libnbd patches for NBD_OPT_EXTENDED_HEADERS Eric Blake
2021-12-03 23:17 ` [libnbd PATCH 01/13] golang: Simplify nbd_block_status callback array copy Eric Blake
2021-12-03 23:17 ` [libnbd PATCH 02/13] block_status: Refactor array storage Eric Blake
2021-12-03 23:17 ` [libnbd PATCH 03/13] protocol: Add definitions for extended headers Eric Blake
2021-12-03 23:17 ` [libnbd PATCH 04/13] protocol: Prepare to send 64-bit requests Eric Blake
2021-12-03 23:17 ` [libnbd PATCH 05/13] protocol: Prepare to receive 64-bit replies Eric Blake
2021-12-03 23:17 ` [libnbd PATCH 06/13] protocol: Accept 64-bit holes during pread Eric Blake
2021-12-03 23:17 ` [libnbd PATCH 07/13] generator: Add struct nbd_extent in prep for 64-bit extents Eric Blake
2021-12-03 23:17 ` [libnbd PATCH 08/13] block_status: Track 64-bit extents internally Eric Blake
2021-12-03 23:17 ` [libnbd PATCH 09/13] block_status: Accept 64-bit extents during block status Eric Blake
2021-12-03 23:17 ` [libnbd PATCH 10/13] api: Add [aio_]nbd_block_status_64 Eric Blake
2021-12-03 23:17 ` [libnbd PATCH 11/13] api: Add three functions for controlling extended headers Eric Blake
2021-12-03 23:17 ` [libnbd PATCH 12/13] generator: Actually request " Eric Blake
2021-12-03 23:17 ` [libnbd PATCH 13/13] interop: Add test of 64-bit block status Eric Blake
2021-12-10 8:16 ` [Libguestfs] [libnbd PATCH 00/13] libnbd patches for NBD_OPT_EXTENDED_HEADERS Laszlo Ersek
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=60a56a8d-87fc-dbaf-0ebf-cd551ce13f14@virtuozzo.com \
--to=vsementsov@virtuozzo.com \
--cc=eblake@redhat.com \
--cc=libguestfs@redhat.com \
--cc=nbd@other.debian.org \
--cc=nsoffer@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).