Received: from eggs.gnu.org ([2001:4830:134:3::10]:42328) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1annqt-0008Cv-DW for qemu-devel@nongnu.org; Wed, 06 Apr 2016 09:50:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1annqs-0006kf-GC for qemu-devel@nongnu.org; Wed, 06 Apr 2016 09:50:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1annqs-0006kb-Bh for qemu-devel@nongnu.org; Wed, 06 Apr 2016 09:50:34 -0400 Date: Wed, 6 Apr 2016 15:50:31 +0200 From: Kevin Wolf Message-ID: <20160406135031.GJ5098@noname.redhat.com> References: <56FD7B7E.4060004@redhat.com> <64B326DA-CDF4-4537-B38A-46E7B57C319C@alex.org.uk> <56FD8069.7020101@redhat.com> <56FE26B2.6090903@redhat.com> <20160405050926.GC4183@noname.redhat.com> <5703BD8F.1080409@redhat.com> <20160406131448.GH5098@noname.redhat.com> <57050F1A.9070604@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57050F1A.9070604@redhat.com> 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: Paolo Bonzini Cc: "nbd-general@lists.sourceforge.net" , "qemu-devel@nongnu.org" , Alex Bligh Am 06.04.2016 um 15:28 hat Paolo Bonzini geschrieben: > > > On 06/04/2016 15:14, Kevin Wolf wrote: > >>> > > > >>> > > I think it does make sense. It means that on completion there is no > >>> > > pending discard operation (i.e. either there wasn't a discard or if > >>> > > there was, it has completed) and other readers will see the final state > >>> > > of the blocks. > >> > > >> > This is what already happens though, isn't it? > > You mean because in practice discard requests aren't even cached, so we > > always behave as if FUA were specified? That's probably right, but is > > there a fundamental reason why some storage backend couldn't have a > > writeback cache for discards? > > No, there isn't. Does qcow2's discard get cached? I wouldn't be > surprised (and SCSI actually says nowhere that WRITE SAME is durable > without a subsequent SYNCHRONIZE CACHE!). For qcow2, yes and no. It has a cache for coalescing discards within a single request, but that cache is flushed before completing the operation. So it's not visible for the caller. > > It probably wouldn't make sense to introduce FUA for this if it didn't > > already exist elsewhere, but now that we do have it, I'd allow it for > > TRIM, too, for the sake of consistency and symmetry. > > Yes, that's fine. Kevin