From: Pavel Borzenkov <[email protected]>

There is a loophole in the protocol that allows a client to send TRIM
request even if support for it wasn't negotiated with the server. State
explicitly that the client MUST NOT send such command without prior
successful negotiation.

Signed-off-by: Pavel Borzenkov <[email protected]>
Reviewed-by: Roman Kagan <[email protected]>
Signed-off-by: Denis V. Lunev <[email protected]>
CC: Wouter Verhelst <[email protected]>
CC: Eric Blake <[email protected]>
CC: Alex Bligh <[email protected]>
---
 doc/proto.md | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/proto.md b/doc/proto.md
index 6d1cb34..d54ed19 100644
--- a/doc/proto.md
+++ b/doc/proto.md
@@ -471,6 +471,9 @@ The following request types exist:
     about the contents of the export affected by this command, until
     overwriting it again with `NBD_CMD_WRITE`.
 
+    A client MUST NOT send a trim request unless `NBD_FLAG_SEND_TRIM`
+    was set in the export flags field.
+
 * Other requests
 
     Some third-party implementations may require additional protocol
-- 
2.1.4


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
Nbd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nbd-general

Reply via email to