[sheepdog] [PATCH v4 06/10] sheep: fetch vdi copy list after sheep joins the cluster
levin li
levin108 at gmail.com
Mon Aug 20 09:41:03 CEST 2012
On 2012年08月20日 13:15, MORITA Kazutaka wrote:
> At Thu, 9 Aug 2012 13:27:41 +0800,
> levin li wrote:
>>
>> From: levin li <xingke.lwp at taobao.com>
>>
>> The new joined node doesn't have the vdi copy list, or have
>> incomplete vdi copy list, so we need to fetch the copy list
>> data from other nodes
>
> It makes code complex to store the copy list in local store because
> it's difficult to keep consistency of the data.
>
> I'd suggest gathering both vid and copy list with SD_OP_READ_VDI
> requests at the same time. Then we can remove this patch and simplify
> 5th patch a lot.
>
> Thanks,
>
> Kazutaka
>
How about this:
We don't store the VDI copy list locally, but read it from the local
VDI inode object when a node starts up, and in update_cluster_info()
we collect the entire VDI copy list from other nodes just as what
get_vdi_bitmap() does, but a little different from get_vdi_bitmap(),
we can not make it perform asynchronously if the node needs recovery,
because we need the VDI copy list in recovery, the solution is that
in prepare_object_list() we make sheep sleeps until it find that the
get_vdi_copy_list() is finished.
thanks,
levin
More information about the sheepdog
mailing list