[Nbd] [PATCH] docs/proto: clarify NBD_CMD_FLUSH
- To: nbd-general@...72...
- Cc: kwolf@...696...
- Subject: [Nbd] [PATCH] docs/proto: clarify NBD_CMD_FLUSH
- From: Paolo Bonzini <pbonzini@...696...>
- Date: Fri, 8 May 2015 12:16:16 +0200
- Message-id: <1431080176-9065-1-git-send-email-pbonzini@...696...>
There are two problems:
1) A literal reading of the specification could imply that the server could
not send a reply if fsync() fails, because in that case previous writes
have not reached the disk. Of course, this part of the specification only
applies to successful replies.
2) Flush does not apply to outstanding writes. It applies to _completed_
writes, ensuring that they also hit the disk.
Reported-by: Kevin Wolf <kwolf@...696...>
Signed-off-by: Paolo Bonzini <pbonzini@...696...>
---
doc/proto.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/doc/proto.txt b/doc/proto.txt
index 0ca46f2..60b11b0 100644
--- a/doc/proto.txt
+++ b/doc/proto.txt
@@ -358,9 +358,9 @@ The following request types exist:
NBD_CMD_DISC command.
* NBD_CMD_FLUSH (3)
- A flush request; a write barrier. The server MUST NOT send the reply
- header to this request before all outstanding write requests that were
- sent before this command have hit the disk (using fsync() or similar).
+ A flush request; a write barrier. The server MUST NOT send a successful
+ reply header for this request before all write requests that were
+ completed before this command have hit the disk (using fsync() or similar).
In this command, "len" and "offset" are reserved, and should be set to
all-zero.
--
2.3.5
Reply to: