mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-08 22:15:21 +00:00
qemu: Introduce QEMU_DOMAIN_JOB_STATS_TYPE_MEMDUMP
Define the qemuMonitorDumpStats as a new job JobStatsType to handle being able to get memory dump statistics. For now do nothing with the new TYPE_MEMDUMP. Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
9d73df98c2
commit
2a4d847e77
@ -467,6 +467,7 @@ qemuDomainJobInfoToInfo(qemuDomainJobInfoPtr jobInfo,
|
|||||||
info->memProcessed = jobInfo->stats.mig.ram_transferred;
|
info->memProcessed = jobInfo->stats.mig.ram_transferred;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case QEMU_DOMAIN_JOB_STATS_TYPE_MEMDUMP:
|
||||||
case QEMU_DOMAIN_JOB_STATS_TYPE_NONE:
|
case QEMU_DOMAIN_JOB_STATS_TYPE_NONE:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -664,6 +665,7 @@ qemuDomainJobInfoToParams(qemuDomainJobInfoPtr jobInfo,
|
|||||||
case QEMU_DOMAIN_JOB_STATS_TYPE_SAVEDUMP:
|
case QEMU_DOMAIN_JOB_STATS_TYPE_SAVEDUMP:
|
||||||
return qemuDomainMigrationJobInfoToParams(jobInfo, type, params, nparams);
|
return qemuDomainMigrationJobInfoToParams(jobInfo, type, params, nparams);
|
||||||
|
|
||||||
|
case QEMU_DOMAIN_JOB_STATS_TYPE_MEMDUMP:
|
||||||
case QEMU_DOMAIN_JOB_STATS_TYPE_NONE:
|
case QEMU_DOMAIN_JOB_STATS_TYPE_NONE:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -114,6 +114,7 @@ typedef enum {
|
|||||||
QEMU_DOMAIN_JOB_STATS_TYPE_NONE = 0,
|
QEMU_DOMAIN_JOB_STATS_TYPE_NONE = 0,
|
||||||
QEMU_DOMAIN_JOB_STATS_TYPE_MIGRATION,
|
QEMU_DOMAIN_JOB_STATS_TYPE_MIGRATION,
|
||||||
QEMU_DOMAIN_JOB_STATS_TYPE_SAVEDUMP,
|
QEMU_DOMAIN_JOB_STATS_TYPE_SAVEDUMP,
|
||||||
|
QEMU_DOMAIN_JOB_STATS_TYPE_MEMDUMP,
|
||||||
} qemuDomainJobStatsType;
|
} qemuDomainJobStatsType;
|
||||||
|
|
||||||
|
|
||||||
@ -147,6 +148,7 @@ struct _qemuDomainJobInfo {
|
|||||||
qemuDomainJobStatsType statsType;
|
qemuDomainJobStatsType statsType;
|
||||||
union {
|
union {
|
||||||
qemuMonitorMigrationStats mig;
|
qemuMonitorMigrationStats mig;
|
||||||
|
qemuMonitorDumpStats dump;
|
||||||
} stats;
|
} stats;
|
||||||
qemuDomainMirrorStats mirrorStats;
|
qemuDomainMirrorStats mirrorStats;
|
||||||
};
|
};
|
||||||
|
@ -13232,6 +13232,7 @@ qemuDomainGetJobStatsInternal(virQEMUDriverPtr driver,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case QEMU_DOMAIN_JOB_STATS_TYPE_MEMDUMP:
|
||||||
case QEMU_DOMAIN_JOB_STATS_TYPE_NONE:
|
case QEMU_DOMAIN_JOB_STATS_TYPE_NONE:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -247,6 +247,25 @@ typedef int (*qemuMonitorDomainBlockThresholdCallback)(qemuMonitorPtr mon,
|
|||||||
void *opaque);
|
void *opaque);
|
||||||
|
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
QEMU_MONITOR_DUMP_STATUS_NONE,
|
||||||
|
QEMU_MONITOR_DUMP_STATUS_ACTIVE,
|
||||||
|
QEMU_MONITOR_DUMP_STATUS_COMPLETED,
|
||||||
|
QEMU_MONITOR_DUMP_STATUS_FAILED,
|
||||||
|
|
||||||
|
QEMU_MONITOR_DUMP_STATUS_LAST,
|
||||||
|
} qemuMonitorDumpStatus;
|
||||||
|
|
||||||
|
VIR_ENUM_DECL(qemuMonitorDumpStatus)
|
||||||
|
|
||||||
|
typedef struct _qemuMonitorDumpStats qemuMonitorDumpStats;
|
||||||
|
typedef qemuMonitorDumpStats *qemuMonitorDumpStatsPtr;
|
||||||
|
struct _qemuMonitorDumpStats {
|
||||||
|
int status; /* qemuMonitorDumpStatus */
|
||||||
|
unsigned long long completed; /* bytes written */
|
||||||
|
unsigned long long total; /* total bytes to be written */
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct _qemuMonitorCallbacks qemuMonitorCallbacks;
|
typedef struct _qemuMonitorCallbacks qemuMonitorCallbacks;
|
||||||
typedef qemuMonitorCallbacks *qemuMonitorCallbacksPtr;
|
typedef qemuMonitorCallbacks *qemuMonitorCallbacksPtr;
|
||||||
struct _qemuMonitorCallbacks {
|
struct _qemuMonitorCallbacks {
|
||||||
|
Loading…
Reference in New Issue
Block a user