qemu-img: dynamically adjust iobuffer size during convert
commitf2521c9023067a007d18b844fe7639c1c5b6f2ac
authorPeter Lieven <pl@kamp.de>
Wed, 27 Nov 2013 10:07:06 +0000 (27 11:07 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 5 Dec 2013 10:45:24 +0000 (5 11:45 +0100)
tree2f6d65b07e187be7f6d789b16e5995056c7c4f3f
parent7572ddc8db114d8c437a97ca3eaedab397f66cda
qemu-img: dynamically adjust iobuffer size during convert

since the convert process is basically a sync operation it might
be benificial in some case to change the hardcoded I/O buffer
size to a greater value.

This patch increases the I/O buffer size if the output
driver advertises an optimal transfer length or discard alignment
that is greater than the default buffer size of 2M.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
qemu-img.c