On 14.07.24 00:56, Vincent Vanlaer wrote:
Signed-off-by: Vincent Vanlaer<libvirt-e6954...@volkihar.be>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru>
Honestly, I don't like this (mostly preexisting, but your patch make the problem more
obvious) code for its "nested success path"
if (ret >= 0) {
ret = ...
if (ret >= 0) {
...
That's because we have the same complex error handling for all these errors. If refactor
the commit_run(), I'd move get-block-status together with "if (copy)" block to
separate function commmit_iteration(), which would have more readable style of error
reporting, like:
ret = ...
if (ret < 0) {
return ret;
}
ret = ...
if (ret < 0) {
return ret;
}
--
Best regards,
Vladimir