Re: [Nbd] [Qemu-devel] Is NBD_CMD_FLAG_FUA valid during NBD_CMD_FLUSH?
- To: Kevin Wolf <kwolf@...696...>
- Cc: "nbd-general@lists.sourceforge.net" <nbd-general@lists.sourceforge.net>, "qemu-devel@...530..." <qemu-devel@...530...>
- Subject: Re: [Nbd] [Qemu-devel] Is NBD_CMD_FLAG_FUA valid during NBD_CMD_FLUSH?
- From: Paolo Bonzini <pbonzini@...696...>
- Date: Wed, 6 Apr 2016 15:28:58 +0200
- Message-id: <57050F1A.9070604@...696...>
- In-reply-to: <20160406131448.GH5098@...2331...>
- References: <56FD7B7E.4060004@...696...> <64B326DA-CDF4-4537-B38A-46E7B57C319C@...872...> <56FD8069.7020101@...696...> <FC6D7B08-B1C0-4ED7-ABD0-FE409C43782C@...872...> <56FE26B2.6090903@...696...> <20160405050926.GC4183@...2331...> <5703BD8F.1080409@...696...> <20160406131448.GH5098@...2331...>
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!).
> 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.
Paolo
Reply to: