[sheepdog] [PATCH v4 13/18] sheep: add a flag to let notify_vdi_add set bitmap if needed

Kai Zhang kyle at zelin.io
Fri May 17 10:45:43 CEST 2013


On May 17, 2013, at 4:14 PM, Liu Yuan <namei.unix at gmail.com> wrote:

> On 05/17/2013 02:27 PM, Kai Zhang wrote:
>> Add a uint8_t flag "set_bitmap" to sd_req.vdi_state.
>> Function notify_vdi_add will set bitmap if "set_bitmap" is not 0.
>> 
>> This feature will be used for recovering vdi state and vdi bitmap
>> on all nodes after loading snapshot to a new cluster.
> 
> Why .set_bitmap is needed?
> 
> post_cluster_new_vdi() won't set the bit on all the node?

post_cluster_new_vdi() will be called only after a SD_OP_NEW_VDI request.

And we won't send SD_OP_NEW_VDI, because it will do a lot things that we don't need.

We use SD_OP_NOTIFY_VDI_ADD request for setting both bitmap and vdi_state.

> 
>> +	hdr.vdi_state.set_bitmap = 0;
> 
> should use 'false'.
> 

Thanks for your catching.

> Thanks,
> Yuan
> 




More information about the sheepdog mailing list