Re: [PATCH v3 1/6] qemuProcessHandleBlockJob: Set disk->mirrorState more often

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

 



On Fri, Feb 13, 2015 at 16:24:28 +0100, Michal Privoznik wrote:
> Currently, upon BLOCK_JOB_* event, disk->mirrorState is not updated
> each time. The callback code handling the events checks if a blockjob
> was started via our public APIs prior to setting the mirrorState.
> However, some block jobs may be started internally (e.g. during
> storage migration), in which case we don't bother with setting
> disk->mirror (there's nothing we can set it to anyway), or other
> fields. But it will come handy if we update the mirrorState in these
> cases too. The event wasn't delivered just for fun - we've started the
> job after all.
> 
> So, in this commit, the mirrorState is set to whatever job status
> we've obtained. Of course, there are some actions on some statuses
> that we want to perform. But instead of if {} else if {} else {} ...
> enumeration, let's move to switch().
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/qemu/qemu_process.c | 35 ++++++++++++++++++++---------------
>  1 file changed, 20 insertions(+), 15 deletions(-)

ACK

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]