From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1altqC-0001W5-37 for qemu-devel@nongnu.org; Fri, 01 Apr 2016 03:50:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1altq7-0005rw-42 for qemu-devel@nongnu.org; Fri, 01 Apr 2016 03:50:00 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:34273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1altq6-0005rs-Sc for qemu-devel@nongnu.org; Fri, 01 Apr 2016 03:49:55 -0400 Received: by mail-wm0-x243.google.com with SMTP id p65so2515991wmp.1 for ; Fri, 01 Apr 2016 00:49:54 -0700 (PDT) Sender: Paolo Bonzini References: <56FD7B7E.4060004@redhat.com> <64B326DA-CDF4-4537-B38A-46E7B57C319C@alex.org.uk> <56FD8069.7020101@redhat.com> <56FD89D0.5050408@redhat.com> From: Paolo Bonzini Message-ID: <56FE281E.5050203@redhat.com> Date: Fri, 1 Apr 2016 09:49:50 +0200 MIME-Version: 1.0 In-Reply-To: <56FD89D0.5050408@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Nbd] Is NBD_CMD_FLAG_FUA valid during NBD_CMD_FLUSH? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , Alex Bligh Cc: "nbd-general@lists.sourceforge.net" , "qemu-devel@nongnu.org" On 31/03/2016 22:34, Eric Blake wrote: > give me possibly stale data because I accessed > the underlying storage rather than paying attention to in-flight writes > that would change what I read". Overlapping I/O is always unspecified, so you should expect stale data if a read overlaps an in-flight write. Not only there's no guarantee of atomicity; the disk is a "safe register" rather than a "regular register" (http://stackoverflow.com/questions/8871633/whats-the-difference-between-safe-regular-and-atomic-registers) The way QEMU does "flush first" for FUA on reads provides the guarantee that "no one else can read something older than what I read", but that assumes that no one else is doing an overlapping write. Paolo