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 <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]> --- 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 ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Nbd-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nbd-general
