From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alua7-0004po-Mq for qemu-devel@nongnu.org; Fri, 01 Apr 2016 04:37:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alua3-0006zo-Oq for qemu-devel@nongnu.org; Fri, 01 Apr 2016 04:37:27 -0400 Received: from barbershop.grep.be ([89.106.240.122]:56731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alua3-0006w6-J5 for qemu-devel@nongnu.org; Fri, 01 Apr 2016 04:37:23 -0400 Date: Fri, 1 Apr 2016 10:35:22 +0200 From: Wouter Verhelst Message-ID: <20160401083522.GC25514@grep.be> References: <1459465399-56203-1-git-send-email-alex@alex.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1459465399-56203-1-git-send-email-alex@alex.org.uk> Subject: Re: [Qemu-devel] [Nbd] [PATCH] Improve documentation of FUA and FLUSH List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Bligh Cc: "nbd-general@lists.sourceforge.net" , "qemu-devel@nongnu.org" On Fri, Apr 01, 2016 at 12:03:19AM +0100, Alex Bligh wrote: > Improve the documentation of NBD_CMD_FLUSH and NBD_CMD_FLAG_FUA. Specifically > the latter may be set on any command, and its semantics on commands other > than NBD_CMD_WRITE need explaining. Further, explain how these relate to > reordering of commands. > > Signed-off-by: Alex Bligh > --- > doc/proto.md | 52 ++++++++++++++++++++++++++++++++++++++++++---------- > 1 file changed, 42 insertions(+), 10 deletions(-) > > diff --git a/doc/proto.md b/doc/proto.md > index c1e05c5..bc4483d 100644 > --- a/doc/proto.md > +++ b/doc/proto.md > @@ -197,6 +197,37 @@ handle as was sent by the client in the corresponding request. In > this way, the client can correlate which request is receiving a > response. > > +#### Ordering of messages and writes > + > +The server MAY process commands out of order, and MAY reply out of > +order, save that: > + > +* All write commands (that includes both `NBD_CMD_WRITE` and > + `NBD_CMD_TRIM`) that the server completes (i.e. replies to) > + prior to processing to a `NBD_CMD_FLUSH` MUST be written to non-volatile > + storage prior to replying to that `NBD_CMD_FLUSH`. The server SHOULD ensure > + that all write command received prior to processing the `NBD_CMD_FLUSH` > + (whether they are replied to or not) are written to non-volatile > + storage prior to processing an `NBD_CMD_FLUSH`; note this is a > + stronger condition than the previous 'MUST' condition. This This seems to make little sense. Are you saying that suddenly now sending a reply for FLUSH with outstanding writes is wrong? If not, the above should be clarified. -- < ron> I mean, the main *practical* problem with C++, is there's like a dozen people in the world who think they really understand all of its rules, and pretty much all of them are just lying to themselves too. -- #debian-devel, OFTC, 2016-02-12