Skip to content

Commit

Permalink
core: do not use dirty extents for full backup
Browse files Browse the repository at this point in the history
Currently the code checks if the backup is incremental, however if the
disk is RAW the client will defer to full backup instead and only incremental
backup supports dirty extents.

This patch considers the mode of the backup when deciding whether use
dirty extents.

Bug-Url: https://bugzilla.redhat.com/2068104
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
  • Loading branch information
bennyz authored and ahadas committed Mar 28, 2022
1 parent 669c69d commit cdd24a4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,9 @@ private boolean isHybridBackup() {
}

private boolean isSupportsDirtyExtents() {
if (!isBackup() || getParameters().getTransferType() != TransferType.Download) {
if (!isBackup() ||
getParameters().getTransferType() != TransferType.Download ||
getDiskImage().getBackupMode() != DiskBackupMode.Incremental) {
return false;
}
VmBackup backup = getBackup();
Expand Down

0 comments on commit cdd24a4

Please sign in to comment.