mirror of https://gitee.com/openkylin/libvirt.git
qemu: Extract snapshot related code to a separate file
We've dumped all the snapshot helpers and related code into qemu_driver.c. It accounted for ~10% of overal size of qemu_driver.c. Separate the code to qemu_snapshot.c/h. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
2087894906
commit
c501663a71
|
@ -172,6 +172,7 @@
|
||||||
@SRCDIR@src/qemu/qemu_qapi.c
|
@SRCDIR@src/qemu/qemu_qapi.c
|
||||||
@SRCDIR@src/qemu/qemu_saveimage.c
|
@SRCDIR@src/qemu/qemu_saveimage.c
|
||||||
@SRCDIR@src/qemu/qemu_slirp.c
|
@SRCDIR@src/qemu/qemu_slirp.c
|
||||||
|
@SRCDIR@src/qemu/qemu_snapshot.c
|
||||||
@SRCDIR@src/qemu/qemu_tpm.c
|
@SRCDIR@src/qemu/qemu_tpm.c
|
||||||
@SRCDIR@src/qemu/qemu_validate.c
|
@SRCDIR@src/qemu/qemu_validate.c
|
||||||
@SRCDIR@src/qemu/qemu_vhost_user.c
|
@SRCDIR@src/qemu/qemu_vhost_user.c
|
||||||
|
|
|
@ -31,6 +31,7 @@ qemu_driver_sources = [
|
||||||
'qemu_qapi.c',
|
'qemu_qapi.c',
|
||||||
'qemu_saveimage.c',
|
'qemu_saveimage.c',
|
||||||
'qemu_security.c',
|
'qemu_security.c',
|
||||||
|
'qemu_snapshot.c',
|
||||||
'qemu_slirp.c',
|
'qemu_slirp.c',
|
||||||
'qemu_tpm.c',
|
'qemu_tpm.c',
|
||||||
'qemu_validate.c',
|
'qemu_validate.c',
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,55 @@
|
||||||
|
/*
|
||||||
|
* qemu_snapshot.h: Implementation and handling of snapshots
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
#include "virconftypes.h"
|
||||||
|
#include "datatypes.h"
|
||||||
|
#include "qemu_conf.h"
|
||||||
|
|
||||||
|
virDomainMomentObjPtr
|
||||||
|
qemuSnapObjFromName(virDomainObjPtr vm,
|
||||||
|
const char *name);
|
||||||
|
|
||||||
|
virDomainMomentObjPtr
|
||||||
|
qemuSnapObjFromSnapshot(virDomainObjPtr vm,
|
||||||
|
virDomainSnapshotPtr snapshot);
|
||||||
|
|
||||||
|
int
|
||||||
|
qemuSnapshotFSFreeze(virDomainObjPtr vm,
|
||||||
|
const char **mountpoints,
|
||||||
|
unsigned int nmountpoints);
|
||||||
|
int
|
||||||
|
qemuSnapshotFSThaw(virDomainObjPtr vm,
|
||||||
|
bool report);
|
||||||
|
|
||||||
|
virDomainSnapshotPtr
|
||||||
|
qemuSnapshotCreateXML(virDomainPtr domain,
|
||||||
|
virDomainObjPtr vm,
|
||||||
|
const char *xmlDesc,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
int
|
||||||
|
qemuSnapshotRevert(virDomainObjPtr vm,
|
||||||
|
virDomainSnapshotPtr snapshot,
|
||||||
|
unsigned int flags);
|
||||||
|
|
||||||
|
int
|
||||||
|
qemuSnapshotDelete(virDomainObjPtr vm,
|
||||||
|
virDomainSnapshotPtr snapshot,
|
||||||
|
unsigned int flags);
|
Loading…
Reference in New Issue