qemu-block
[Top][All Lists]
Advanced

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

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


From: Eric Blake
Subject: Re: [PATCH 2/2] nbd/proto: add NBD_CMD_WRITE_ZEROES64
Date: Thu, 6 Feb 2020 07:12:49 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

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 <address@hidden>
---
  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 via email to

[Prev in Thread] Current Thread [Next in Thread]