[sheepdog] [PATCH] sheep: wait until there is no get_vdis work in wait_get_vdis_done()

Hitoshi Mitake mitake.hitoshi at gmail.com
Wed Aug 28 04:35:00 CEST 2013


At Wed, 28 Aug 2013 10:46:47 +0900,
MORITA Kazutaka wrote:
> 
> From: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
> 
> There is a race condition like as follows:
> 
>  1. Node A, B, and C start up.
>  2. Node A receives accept events from B and C, and calls
>     start_recovery().
>  3. Node A calls wait_get_vdis_done in the recovery thread, but there
>     are two get_vdis works in sys->block_wqueue.
>  4. When the first get_vdis_done() is called, is_vdi_list_ready will
>     be set to false.
>  5. Node A starts object recovery without receiving vdi state from C.
> 
> To fix the problem, this patch counts the number of get_vdi works in
> the block_wqueue.
> 
> Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
> ---
> 
> I think this should go into the stable branch, too.

Looks good to me.
Reviewed-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>

I'll push it to stable branches later.

Thanks,
Hitoshi



More information about the sheepdog mailing list