nbd-proxy: run start hook asynchronously
Currently, we run the start hook synchronously, and wait() for it to
complete.
This means that the proxy process will be blocked during the execution
of that hook, and no servicing any read/write requests from the nbd
device. If any part of the hook implementation needs to access the
device, it'll block waiting for the device (which is waiting for the
nbd-proxy, which is waiting for the hook).
This change runs the hook (for the "start" action) in the background,
while still servicing requests. This allows hooks to access the device.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
1 file changed