2019-09-18 11:11:12 +00:00
|
|
|
/*
|
|
|
|
* qemu_backup.h: Implementation and handling of the backup jobs
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library. If not, see
|
|
|
|
* <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
int
|
|
|
|
qemuBackupBegin(virDomainObjPtr vm,
|
|
|
|
const char *backupXML,
|
|
|
|
const char *checkpointXML,
|
|
|
|
unsigned int flags);
|
|
|
|
|
|
|
|
char *
|
|
|
|
qemuBackupGetXMLDesc(virDomainObjPtr vm,
|
|
|
|
unsigned int flags);
|
|
|
|
|
|
|
|
void
|
|
|
|
qemuBackupJobCancelBlockjobs(virDomainObjPtr vm,
|
|
|
|
virDomainBackupDefPtr backup,
|
2019-12-20 10:15:47 +00:00
|
|
|
bool terminatebackup,
|
|
|
|
int asyncJob);
|
2019-09-18 11:11:12 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
qemuBackupNotifyBlockjobEnd(virDomainObjPtr vm,
|
|
|
|
virDomainDiskDefPtr disk,
|
|
|
|
qemuBlockjobState state,
|
2020-04-16 09:23:07 +00:00
|
|
|
const char *errmsg,
|
2019-09-18 11:11:12 +00:00
|
|
|
unsigned long long cur,
|
2019-12-20 10:15:47 +00:00
|
|
|
unsigned long long end,
|
|
|
|
int asyncJob);
|
|
|
|
|
2019-12-20 10:20:24 +00:00
|
|
|
void
|
|
|
|
qemuBackupJobTerminate(virDomainObjPtr vm,
|
|
|
|
qemuDomainJobStatus jobstatus);
|
2019-11-26 17:25:49 +00:00
|
|
|
|
|
|
|
int
|
|
|
|
qemuBackupGetJobInfoStats(virQEMUDriverPtr driver,
|
|
|
|
virDomainObjPtr vm,
|
|
|
|
qemuDomainJobInfoPtr jobInfo);
|
2019-12-12 15:15:18 +00:00
|
|
|
|
|
|
|
/* exported for testing */
|
2020-05-22 12:48:46 +00:00
|
|
|
int
|
|
|
|
qemuBackupDiskPrepareOneBitmapsChain(virStorageSourcePtr backingChain,
|
|
|
|
virStorageSourcePtr targetsrc,
|
|
|
|
const char *targetbitmap,
|
|
|
|
const char *incremental,
|
|
|
|
virJSONValuePtr actions,
|
2020-10-22 17:04:18 +00:00
|
|
|
GHashTable *blockNamedNodeData);
|