]> xenbits.xensource.com Git - libvirt.git/commit
qemuSnapshotCreateActiveExternal: Don't thaw filesystems when freeze fails
authorPeter Krempa <pkrempa@redhat.com>
Mon, 15 Feb 2021 16:52:24 +0000 (17:52 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 16 Feb 2021 11:25:30 +0000 (12:25 +0100)
commitee91c825338db30ba71430b9a49ab159b54d4b07
treeb9b911954b34939a27f23374ca41807d893b6144
parentec86b8fa29fa97b51382eb19ca2355c87dfcc38f
qemuSnapshotCreateActiveExternal: Don't thaw filesystems when freeze fails

If we didn't freeze any filesystems we should not even attempt thawing
them. Additionally 'guest-fsfreeze-freeze' fails if the filesystems are
already frozen, where thawing them may break users data integrity if
they used VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE accidentally after an
explicit virDomainFSFreeze and the next snapshot without that flag would
be taken with already thawed filesystems.

This effectively reverts 7c736bab06479ccec59df69fb79a5c06d112d8fb .
Libvirt nowadays checks whether the guest agent is connected and pings
it before issuing an command so it's very unlikely that we'd end up in a
situation where qemuSnapshotCreateActiveExternal froze filesystems and
didn't thaw them.

Additionally we now discourage the use of
VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE since users have better control if
they freeze the FS themselves.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/qemu/qemu_snapshot.c