[sheepdog] [PATCH 03/11] qemu-sockets: make wait_for_connect be invoked in qemu_aio_wait

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Wed Jul 24 09:41:33 CEST 2013


At Tue, 23 Jul 2013 13:36:08 +0200,
Paolo Bonzini wrote:
> 
> Il 23/07/2013 10:30, MORITA Kazutaka ha scritto:
> > This allows us to use inet_nonblocking_connect() and
> > unix_nonblocking_connect() in block drivers.
> > 
> > qemu-ga needs to link block-obj to resolve dependencies of
> > qemu_aio_set_fd_handler().
> > 
> > Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
> 
> I'm not sure this is safe.  You could have e.g. migration start during
> qemu_aio_wait().

I thought that it is safe.  Qemu creates another thread for migration
and it can be started at any time, either way.  However, so as not to
hurt the existing codes, it might be better to create another
nonblocking connect for qemu_aio_wait().

I think of dropping this patch from this series and will leave it for
another day.  Usually, sheepdog users prepare a local sheepdog daemon
to be connected to, and connect() is unlikely to sleep for a long
time.  Using a blocking connect wouldn't be a big problem.

Thanks,

Kazutaka



More information about the sheepdog mailing list