Shahar Havivi has posted comments on this change. Change subject: kvmstream: tool for streaming images from libvirt ......................................................................
Patch Set 1: (4 comments) https://gerrit.ovirt.org/#/c/55797/1/kvmstream.py File kvmstream.py: PS1, Line 47: init_progres > typo: progress Done Line 57: write_output('[ %d.0] Creating output metadata\n' % elapsed_time) Line 58: write_output('[ %d.0] Finishing off\n' % elapsed_time) Line 59: Line 60: Line 61: def download_volume(stream, vol, dest, diskno, disks): > You should use the directio module from ovirt-imageio - I can move it to th Please do move it to common, for the progress I will check if that will be sufficient. Line 62: global elapsed_time Line 63: write_output('[ %d.0] Copying disk %d/%d to %s\n' % Line 64: (elapsed_time, diskno, disks, dest)) Line 65: size = vol.info()[2] PS1, Line 68: f = open(dest, 'w') > please use context managers: Done Line 69: vol.download(stream, 0, 0, 0) Line 70: write_output(' (0/100%%)\r') Line 71: counter = 0 Line 72: while pos < size: Line 73: buf = s.recv(1024) > The 1024 is probably a low value - I'd increase it (but in any case, I thin I am not sure, what size do you suggest? Line 74: f.write(buf) Line 75: f.flush() Line 76: if not pos % jump: Line 77: counter = counter + 1 -- To view, visit https://gerrit.ovirt.org/55797 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9d95c3bf4b2605e71f899171259d4721204eb8e2 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Shahar Havivi <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Michal Skrivanek <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Shahar Havivi <[email protected]> Gerrit-Reviewer: Yaniv Kaul <[email protected]> Gerrit-Reviewer: gerrit-hooks <[email protected]> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
