On Tue, Oct 11, 2016 at 8:44 PM Daniel P. Berrange <berra...@redhat.com>
> Not sure if this is immediately helpful to your scneario or
> not, but I'd like to see the qemu_chr_add_handlers method
> removed long term, and everything converted to use the
> qemu_chr_fe_add_watch function instead. This reverses the data
> flow pattern - with chr_add_handlers the chardev code pushes
> data from the backend into the frontends, but with fe_add_watch
> the frontend pulls data from the backend.
Very interesting, that would help, but I think that wouldn't be enough,
since we would still have the "event" handlers to properly register/track.
Furthermore, that upside-down change is not easy. I think I will simply go
with a new fe handler tag.
> To properly fix the non-blocking writes from the frontend to
> the backend will likely require use of qemu_chr_fe_add_watch,
> and so having that function used for everything will make the
> code clearer overall IMHO.
>  eg the long term solution to replace this hack:
> commit 90f998f5f4267a0c22e983f533d19b9de1849283
> Author: Daniel P. Berrange <berra...@redhat.com>
> Date: Tue Sep 6 14:56:05 2016 +0100
> char: convert qemu_chr_fe_write to qemu_chr_fe_write_all
> |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/
> |: http://libvirt.org -o- http://virt-manager.org
> |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/