qemuMonitorDumpToFd: Drop 'detach' argument

The only caller always passes 'true'. We also don't want to ever use the
blocking variant as it blocks the whole monitor until dump finishes.

Hardcode it to 'true' in the monitor code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa
2025-05-21 15:49:36 +02:00
parent d9b90d6f89
commit f0b29d4a6f
6 changed files with 8 additions and 13 deletions
+1 -1
View File
@@ -3045,7 +3045,7 @@ qemuDumpToFd(virQEMUDriver *driver,
}
}
rc = qemuMonitorDumpToFd(priv->mon, fd, dumpformat, true);
rc = qemuMonitorDumpToFd(priv->mon, fd, dumpformat);
qemuDomainObjExitMonitor(vm);
if (rc < 0)
+2 -3
View File
@@ -2362,8 +2362,7 @@ qemuMonitorGetDumpGuestMemoryCapability(qemuMonitor *mon,
int
qemuMonitorDumpToFd(qemuMonitor *mon,
int fd,
const char *dumpformat,
bool detach)
const char *dumpformat)
{
int ret;
VIR_DEBUG("fd=%d dumpformat=%s", fd, dumpformat);
@@ -2373,7 +2372,7 @@ qemuMonitorDumpToFd(qemuMonitor *mon,
if (qemuMonitorSendFileHandle(mon, "dump", fd) < 0)
return -1;
ret = qemuMonitorJSONDump(mon, "fd:dump", dumpformat, detach);
ret = qemuMonitorJSONDump(mon, "fd:dump", dumpformat);
if (ret < 0) {
if (qemuMonitorCloseFileHandle(mon, "dump") < 0)
+1 -2
View File
@@ -893,8 +893,7 @@ int qemuMonitorQueryDump(qemuMonitor *mon,
int qemuMonitorDumpToFd(qemuMonitor *mon,
int fd,
const char *dumpformat,
bool detach);
const char *dumpformat);
int qemuMonitorGraphicsRelocate(qemuMonitor *mon,
int type,
+2 -3
View File
@@ -3371,8 +3371,7 @@ qemuMonitorJSONGetDumpGuestMemoryCapability(qemuMonitor *mon,
int
qemuMonitorJSONDump(qemuMonitor *mon,
const char *protocol,
const char *dumpformat,
bool detach)
const char *dumpformat)
{
g_autoptr(virJSONValue) cmd = NULL;
g_autoptr(virJSONValue) reply = NULL;
@@ -3381,7 +3380,7 @@ qemuMonitorJSONDump(qemuMonitor *mon,
"b:paging", false,
"s:protocol", protocol,
"S:format", dumpformat,
"B:detach", detach,
"b:detach", true,
NULL);
if (!cmd)
return -1;
+1 -2
View File
@@ -193,8 +193,7 @@ qemuMonitorJSONGetDumpGuestMemoryCapability(qemuMonitor *mon,
int
qemuMonitorJSONDump(qemuMonitor *mon,
const char *protocol,
const char *dumpformat,
bool detach);
const char *dumpformat);
int
qemuMonitorJSONGraphicsRelocate(qemuMonitor *mon,
+1 -2
View File
@@ -1149,8 +1149,7 @@ GEN_TEST_FUNC(qemuMonitorJSONSaveVirtualMemory, 0, 1024, "/foo/bar")
GEN_TEST_FUNC(qemuMonitorJSONSavePhysicalMemory, 0, 1024, "/foo/bar")
GEN_TEST_FUNC(qemuMonitorJSONMigrate, 0, "tcp:localhost:12345")
GEN_TEST_FUNC(qemuMonitorJSONMigrateRecover, "tcp://destination.host:54321");
GEN_TEST_FUNC(qemuMonitorJSONDump, "dummy_protocol", "elf",
true)
GEN_TEST_FUNC(qemuMonitorJSONDump, "dummy_protocol", "elf")
GEN_TEST_FUNC(qemuMonitorJSONGraphicsRelocate, VIR_DOMAIN_GRAPHICS_TYPE_SPICE,
"localhost", 12345, 12346, "certsubjectval")
GEN_TEST_FUNC(qemuMonitorJSONRemoveNetdev, "net0")