Current implementation of virDomainBlockPull is actually a subset of virDomainBlockRebase with NULL base.
I suggest to add new generalised API call virDomainBlockRebase2 which will serve as a superset of both and support params list. Having params list is more flexible and extendible for future possible improvements of qemu block-stream or block-copy. For now only 'base' and 'bandwidth' params are proposed, but we can extend them, for example, to some block copy params (VIR_DOMAIN_BLOCK_REBASE_COPY). Nikolai Barybin (2): api: remote: introduce virDomainBlockRebase2 API qemu: implement driver support for domainBlockRebase2 API include/libvirt/libvirt-domain.h | 20 ++++++ src/driver-hypervisor.h | 8 +++ src/libvirt-domain.c | 69 +++++++++++++++++++ src/libvirt_public.syms | 5 ++ src/qemu/qemu_driver.c | 113 +++++++++++++++++++++++++------ src/remote/remote_driver.c | 1 + src/remote/remote_protocol.x | 17 ++++- src/remote_protocol-structs | 10 +++ 8 files changed, 222 insertions(+), 21 deletions(-) -- 2.47.3