On Fri 21 Feb 2020 12:35:55 PM CET, Max Reitz wrote: >> @@ -2223,22 +2227,23 @@ static coroutine_fn int >> qcow2_co_preadv_part(BlockDriverState *bs, >> } >> >> qemu_co_mutex_lock(&s->lock); >> - ret = qcow2_get_cluster_offset(bs, offset, &cur_bytes, >> &cluster_offset); >> + ret = qcow2_get_cluster_offset(bs, offset, &cur_bytes, >> + &cluster_offset, &type); > > I wonder whether this is kind of a bug fix here. It’s entirely possible > that @ret isn’t set after this, and then we get to the “out” label, > which has a check on “if (ret == 0)”.
I think that in order to get to "if (ret == 0)" you would first need to run aio_task_pool_new(), and that codepath guarantees that @ret is set. Berto