mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
v2v: rhv-upload-plugin: Fix name error
"http" and "transfer" variables were missing in emulate_zero, so the code would fail with NameError. This can happen only when communicating with old imageio versions not supporting the "zero" feature. Testing with qemu-img 2.12 show that we never send emulated zero request because of the highestwrite mechanism, but it can break with older qemu-img-rhev used on RHEL.
This commit is contained in:
committed by
Richard W.M. Jones
parent
f4e0a8342d
commit
0ae61ce99c
@@ -338,6 +338,9 @@ def zero(h, count, offset, may_trim):
|
||||
r.read()
|
||||
|
||||
def emulate_zero(h, count, offset):
|
||||
http = h['http']
|
||||
transfer = h['transfer']
|
||||
|
||||
# qemu-img convert starts by trying to zero/trim the whole device.
|
||||
# Since we've just created a new disk it's safe to ignore these
|
||||
# requests as long as they are smaller than the highest write seen.
|
||||
|
||||
Reference in New Issue
Block a user