[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH 2/2] nbd/proto: add NBD_CMD_WRITE_ZEROES64



On 2/5/20 10:43 AM, Vladimir Sementsov-Ogievskiy wrote:
Add new structured request type to represent 64bit version of
NBD_CMD_WRITE_ZEROES.

Initial reaction: why do we need a new NBD_CMD? Why can't we reuse the existing NBD_CMD_WRITE_ZEROES, and merely document that if structured messages were negotiated, then calling NBD_CMD_WRITE_ZEROES with a structured request gives a larger range of access?


Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
  doc/proto.md | 26 ++++++++++++++++++++++++++
  1 file changed, 26 insertions(+)

diff --git a/doc/proto.md b/doc/proto.md
index cb0ac56..378a800 100644
--- a/doc/proto.md
+++ b/doc/proto.md
@@ -1096,6 +1096,8 @@ The field has the following format:
    is set.
  - bit 12, `NBD_FLAG_STRUCTURED_REQUEST`; allow clients to use
    structured requests.
+- bit 13, `NBD_FLAG_SEND_WRITE_ZEROES64`: documents that the server
+  understands `NBD_CMD_WRITE_ZEROES64` structured request chunk type.

Why do we need this bit? Could we instead rely on the existing NBD_FLAG_SEND_WRITE_ZEROES combined with successful negotiation of structured requests as being sufficient to imply that the server therefore supports 64-bit zero requests?

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


Reply to: