On 5/20/19 9:18 AM, Eric Blake wrote:
(2) Shouldn't it be an error if the thread model returns a more parallel thread model than the constant?
I thought about that, but my initial idea was to instead just declare that attempts at a more parallel model are just silently ignored (with at most a debug message visible during -fv).
I hit send too soon. My biggest reasoning for this? Consider the python plugin. If we allow a python script to request PARALLEL now (but silently ignore it, because our C glue code currently defines the constant to SERIALIZE_ALL_REQUESTS), then that script will instantly gain parallel support if a future nbdkit version manages to get the C glue code rewritten to use better re-entrancy to the point of redefining THREAD_MODEL to PARALLEL after all. (Based on code comments, it may be doable with some effort for python, although I have less hopes for Ruby).
Anyway patch series generally looks fine to me.
Thanks; I'll push shortly. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org