Skip to content

Commit

Permalink
ovirt-img: upload consider sparse to measure
Browse files Browse the repository at this point in the history
Measure is only required for qcow2 sparse images
to block storage. Currently we only consider the
format, but we can also consider sparse
attribute before measuring the image to avoid
unnecessary measures.

Signed-off-by: Albert Esteve <[email protected]>
  • Loading branch information
aesteve-rh authored and nirs committed Aug 3, 2022
1 parent 0f5f5da commit 5d2c382
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ovirt_imageio/client/_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def _prepare(args):
sparse = args.sparse

initial_size = None
if disk_format == FORMAT_QCOW2:
if disk_format == FORMAT_QCOW2 and sparse:
initial_size = _api.measure(args.filename, disk_format)["required"]

name = args.name
Expand Down

0 comments on commit 5d2c382

Please sign in to comment.