[sheepdog] [PATCH] sheep: split create_vdi_obj() into 4 functions

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Thu Aug 22 11:21:17 CEST 2013


At Thu, 22 Aug 2013 16:57:30 +0800,
Liu Yuan wrote:
> 
> sd_{vdi,snapshot}_create share almost the same logic, how about merge them
> into one function? Either ask sd_{vdi,snapshot}_create call the shared helper
> or use single sd_vdi_create() function

I don't think they share so much the same logic.  Both call
vdi_lookup() but how to handle the return value is different.  Both
calls notify_vdi_add() but it should be moved to cluster_new_vdi()
because we should call it only after we successfully created the vdi
(I think of doing this change in the next version).

Thanks,

Kazutaka



More information about the sheepdog mailing list