diff --git a/pkg/importer/data-processor.go b/pkg/importer/data-processor.go index 4fdb03991b..328bbc39a2 100644 --- a/pkg/importer/data-processor.go +++ b/pkg/importer/data-processor.go @@ -368,7 +368,9 @@ func (dp *DataProcessor) calculateTargetSize() int64 { klog.V(1).Infof("Request image size not empty.\n") newImageSizeQuantity := resource.MustParse(dp.requestImageSize) minQuantity := util.MinQuantity(targetQuantity, &newImageSizeQuantity) - targetQuantity = &minQuantity + if targetQuantity.Cmp(minQuantity) == -1 { + targetQuantity = &minQuantity + } } klog.V(1).Infof("Target size %s.\n", targetQuantity.String()) targetSize := targetQuantity.Value()