On Mon, Nov 27, 2023 at 05:25:54PM -0300, Fabiano Rosas wrote: > The only way for the channel backend to report an error to the multifd > core during creation is by setting the QIOTask error. We must allow > the channel backend to set the error even if the QIOChannel has failed > to be created, which means the QIOTask source object would be NULL. > > At multifd_new_send_channel_async() move the QOM casting of the > channel until after we have checked for the QIOTask error. > > Signed-off-by: Fabiano Rosas <faro...@suse.de> > --- > context: When doing multifd + file, it's possible that we fail to open > the file. I'll use the empty QIOTask to report the error back to > multifd.
The "context" can be slightly reworded and put into the commit message too. Reviewed-by: Peter Xu <pet...@redhat.com> -- Peter Xu