record source size to volume info

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
This commit is contained in:
Lyndon-Li
2026-09-04 19:50:45 +08:00
parent 6c86921876
commit e1600caab3
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -181,6 +181,9 @@ type SnapshotDataMovementInfo struct {
// incremental and must stay distinguishable from "unknown".
IncrementalSize *int64 `json:"incrementalSize,omitempty"`
// The size of source volume, for backup only
SourceSize int64 `json:"sourceSize,omitempty"`
// The DataUpload's Status.Phase value
Phase velerov2alpha1.DataUploadPhase
}
+1
View File
@@ -1325,6 +1325,7 @@ func updateVolumeInfos(
volumeInfos[index].SnapshotDataMovementInfo.RetainedSnapshot = dataUpload.Spec.CSISnapshot.VolumeSnapshot
volumeInfos[index].SnapshotDataMovementInfo.Size = dataUpload.Status.Progress.TotalBytes
volumeInfos[index].SnapshotDataMovementInfo.IncrementalSize = dataUpload.Status.IncrementalBytes
volumeInfos[index].SnapshotDataMovementInfo.SourceSize = dataUpload.Status.SourceSize
volumeInfos[index].SnapshotDataMovementInfo.Phase = dataUpload.Status.Phase
if dataUpload.Status.Phase == velerov2alpha1.DataUploadPhaseCompleted {