Am 21.06.2016 um 09:32 hat Paolo Bonzini geschrieben:
>
>
> On 20/06/2016 17:19, Denis V. Lunev wrote:
> > + /* Check if storage is actually dirty before flushing to disk */
> > + if (!bs->dirty) {
> > + goto flush_parent;
> > + }
> > + bs->dirty = false;
> > +
>
> This should be cleared after the flush is complete. If you have
>
> write begin
> write end
> flush #1 begin
> flush #2 begin
>
> Then the second flush must only return after the first has finished.
I think clearing bs->dirty after the flush completion wouldn't
necessarily be right either if there are concurrent writes in flight, as
only completed writes are guaranteed to be flushed by it.
Kevin