mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-11 12:25:52 +00:00
qemu: Simplify argument list of qemuDomainBlockPullCommon
Drop the 'driver' argument since it can be extracted from private data to shorten the argument list. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
c419a43565
commit
742f599033
@ -17929,14 +17929,14 @@ qemuDomainBlockPivot(virQEMUDriverPtr driver,
|
|||||||
/* bandwidth in MiB/s per public API. Caller must lock vm beforehand,
|
/* bandwidth in MiB/s per public API. Caller must lock vm beforehand,
|
||||||
* and not access it afterwards. */
|
* and not access it afterwards. */
|
||||||
static int
|
static int
|
||||||
qemuDomainBlockPullCommon(virQEMUDriverPtr driver,
|
qemuDomainBlockPullCommon(virDomainObjPtr vm,
|
||||||
virDomainObjPtr vm,
|
|
||||||
const char *path,
|
const char *path,
|
||||||
const char *base,
|
const char *base,
|
||||||
unsigned long bandwidth,
|
unsigned long bandwidth,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
|
virQEMUDriverPtr driver = priv->driver;
|
||||||
const char *device = NULL;
|
const char *device = NULL;
|
||||||
const char *jobname = NULL;
|
const char *jobname = NULL;
|
||||||
virDomainDiskDefPtr disk;
|
virDomainDiskDefPtr disk;
|
||||||
@ -18750,7 +18750,6 @@ static int
|
|||||||
qemuDomainBlockRebase(virDomainPtr dom, const char *path, const char *base,
|
qemuDomainBlockRebase(virDomainPtr dom, const char *path, const char *base,
|
||||||
unsigned long bandwidth, unsigned int flags)
|
unsigned long bandwidth, unsigned int flags)
|
||||||
{
|
{
|
||||||
virQEMUDriverPtr driver = dom->conn->privateData;
|
|
||||||
virDomainObjPtr vm;
|
virDomainObjPtr vm;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
unsigned long long speed = bandwidth;
|
unsigned long long speed = bandwidth;
|
||||||
@ -18779,7 +18778,7 @@ qemuDomainBlockRebase(virDomainPtr dom, const char *path, const char *base,
|
|||||||
/* For normal rebase (enhanced blockpull), the common code handles
|
/* For normal rebase (enhanced blockpull), the common code handles
|
||||||
* everything, including vm cleanup. */
|
* everything, including vm cleanup. */
|
||||||
if (!(flags & VIR_DOMAIN_BLOCK_REBASE_COPY))
|
if (!(flags & VIR_DOMAIN_BLOCK_REBASE_COPY))
|
||||||
return qemuDomainBlockPullCommon(driver, vm, path, base, bandwidth, flags);
|
return qemuDomainBlockPullCommon(vm, path, base, bandwidth, flags);
|
||||||
|
|
||||||
/* If we got here, we are doing a block copy rebase. */
|
/* If we got here, we are doing a block copy rebase. */
|
||||||
if (!(dest = virStorageSourceNew()))
|
if (!(dest = virStorageSourceNew()))
|
||||||
@ -18935,8 +18934,7 @@ qemuDomainBlockPull(virDomainPtr dom, const char *path, unsigned long bandwidth,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return qemuDomainBlockPullCommon(dom->conn->privateData,
|
return qemuDomainBlockPullCommon(vm, path, NULL, bandwidth, flags);
|
||||||
vm, path, NULL, bandwidth, flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user