On 07.06.2014 20:51, Max Reitz wrote:
qemu-img should use QMP commands whenever possible in order to ensure
feature completeness of both online and offline image operations. For
the "commit" command, this is relatively easy, so implement it first
(in the hope that indeed others will follow).
As qemu-img does not have access to QMP (due to QMP being intertwined
with basically everything in qemu), we cannot directly use QMP, but at
least use the functions the corresponding QMP commands are using (which
would be "block-commit", in this case).
With Stefan's pull request for his dataplane series now out, I thought
this a good opportunity to send a rebase of this series.
Ping; Hu Tao will need "minimal_blob_size()" from patch 3 for the next
iteration of his "qemu-img: add preallocation=full" series. Sending an
own patch just for that function seems infeasible, as it is a static
function which would be unused in the meantime (which throws a compiler
warning and an error thanks to -Werror). Using __attribute__((unused))
just for this seems like a hack; especially considering that all patches
of this series have been reviewed and it should therefore be ready to merge.
In case there are some objections because you want to test it more, it
would be fine to merge the first three patches (which suffice for the
preallocation series and should only introduce unused codepaths) now and
the rest later on.
Max