qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 26/45] mirror: introduce mirror job


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH v2 26/45] mirror: introduce mirror job
Date: Tue, 16 Oct 2012 10:24:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0

Am 16.10.2012 08:36, schrieb Paolo Bonzini:
> Il 15/10/2012 18:57, Kevin Wolf ha scritto:
>> Am 26.09.2012 17:56, schrieb Paolo Bonzini:
>>> +
>>> +            /* We're out of the streaming phase.  From now on, if the job
>>> +             * is cancelled we will actually complete all pending I/O and
>>> +             * report completion.  This way, block-job-cancel will leave
>>> +             * the target in a consistent state.
>>> +             */
>>
>> Don't we have block_job_complete() for that now? Then I think the job
>> can be cancelled immediately, even in an inconsistent state.
> 
> The idea was that block-job-cancel will still leave the target in a
> consistent state if executed during the second phase.  Otherwise it is
> impossible to take a consistent snapshot and keep running on the first
> image.

Yes, I noticed that when reading one of the following patches. However,
this behaviour didn't seem to be documented very well. IIRC, you do
mention it in the QMP documentation for block-job-complete, but wouldn't
it make sense to describe what cancel/complete mean in the documentation
for drive-mirror as well?

I'd also consider putting a comment in the code that explicitly says
that we intentionally wait for a consistent state before actually
cancelling. This is not the intuitive thing to do with cancel, so it
confused me.

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]