<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Apr 10, 2018 at 1:44 PM Richard W.M. Jones <<a href="mailto:rjones@redhat.com">rjones@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We now have true zeroing support in oVirt imageio, thanks for that.<br>
<br>
However a problem is that ‘qemu-img convert’ issues zero requests for<br>
the whole disk before starting the transfer.  It does this using 32 MB<br>
requests which take approx. 1 second each to execute on the oVirt side.  </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Two problems therefore:<br>
<br>
(1) Zeroing the disk can take a long time (eg. 40 GB is approx.<br>
    20 minutes).  Furthermore there is no progress indication while this<br>
    is happening.<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
    Nothing bad happens: because it is making frequent requests there<br>
    is no timeout.<br>
<br>
(2) I suspect that because we don't have trim support that this is<br>
    actually causing the disk to get fully allocated on the target.<br>
<br>
    The NBD requests are sent with may_trim=1 so we could turn these<br>
    into trim requests, but obviously cannot do that while there is no<br>
    trim support.<br></blockquote><div><br></div><div>It sounds like nbdkit is emulating trim with zero instead of noop. </div><div><br></div><div>I'm not sure why qemu-img is trying to do, I hope the nbd maintainer on </div><div>qemu side can explain this.</div><div><br></div><div>However, since you suggest that we could use "trim" request for these</div><div>requests, it means that these requests are advisory (since trim is), and</div><div>we can just ignore them if the server does not support trim.</div><div><br></div><div>This will also solve the timeout issue you reported in private mail.</div><div><br></div><div>Adding Eric and qemu-block.</div><div><br></div><div>Nir</div></div></div>