qemu-block
[Top][All Lists]
Advanced

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

Re: about mirror cancel


From: Vladimir Sementsov-Ogievskiy
Subject: Re: about mirror cancel
Date: Fri, 16 Apr 2021 10:45:59 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1

16.04.2021 10:11, Max Reitz wrote:
On 16.04.21 09:05, Max Reitz wrote:
On 15.04.21 20:46, Vladimir Sementsov-Ogievskiy wrote:

[...]

Note, that if cancelling all in-flight requests on target is wrong on mirror 
cancel, we still don't have real bug, as the only implementation of 
.bdrv_cancel_in_flight is stopping reconnect waiting in nbd driver. So, we'll 
cancel requests only if connection is already lost anyway.

But that probably means, that correct name of the handler would be 
.bdrv_cancel_in_fligth_requests_that_will_most_probably_fail_anyway()..

It’s documentation states that it should cancel all in-flight requests, so it’s 
more likely it just isn’t implemented where it could be.

Oh, I now see you added it in the same series.  Well, then I suppose you’re 
free to change the semantics as you see fit.

But be aware that even cancelling those requests means that you abandon the 
target.  So it must then fail instead of emitting the COMPLETED event (AFAIR 
the mirror job emits COMPLETED when cancelled in READY with force=false).

Note that BLOCK_JOB_COMPLETED can indicate failure, it has error field.. 
Interesting, does libvirt aware of it..


If the user wants the mirror job to create a consistent copy and so cancels it 
after READY (with force=false), I don’t know whether cancelling those hanging 
requests is what we want.  If the cancel hangs and the user sees this, they are 
still free to decide to cancel again with force=true, no?

Right. All right, I'll remake the feature to cancel requests only with 
force=true. Thanks for explanations, and great that I decided to ask.

--
Best regards,
Vladimir



reply via email to

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