[libvirt RFC 01/24] qemu_block: extract block commit code to separate function

Peter Krempa pkrempa at redhat.com
Thu Sep 1 12:39:26 UTC 2022


On Tue, Aug 23, 2022 at 18:32:04 +0200, Pavel Hrdina wrote:

Commit message could be a bit more verbose.

> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> ---
>  src/qemu/qemu_block.c  | 197 +++++++++++++++++++++++++++++++++++++++++
>  src/qemu/qemu_block.h  |   9 ++
>  src/qemu/qemu_driver.c | 181 +------------------------------------
>  3 files changed, 207 insertions(+), 180 deletions(-)

There's nothing wrong with this commit itself but for the next commit
I'm going to suggest that all the bits for extracting the
virStorageSource objects based on the names are put back (or kept) into
qemuDomainBlockCommit, as that bit is definitely not resuable.

In the end I'd suggest that qemuBlockCommit will actually be what you
have for qemuBlockCommitImpl and all the checks are kept in
qemuDomainBlockCommit.

With that it might make sense to do that in a single step rather than
moving the code back and forth.


More information about the libvir-list mailing list