[sheepdog] [PATCH] sheep: remove block/unblock callbacks

Liu Yuan namei.unix at gmail.com
Wed Jun 6 15:28:38 CEST 2012


On 06/06/2012 09:08 PM, Christoph Hellwig wrote:

> I like this idea, but I don't think it will actually work as-is.
> 
> The current blocking cluster operations quience other cluster operations
> from the when they are handled in the main thread first, over the
> execution in the worker thread, until after the process_main method
> is called on all nodes.
> 
> By just serializing operations we can already start new cluster
> operations before the previous process_main has finished.
> 
> The case where I can see this causing major issues is VDI creation:
> the vdi_inuse bit is only set on all nodes in the process_main
> operation, but the way I read this patch we could have already
> started a new VDI create operation on another node that would race
> to use the same VDI slot (if using the same or a similar enough name)


Yes, this patch only serialize the cluster requests on local node, but I
think this is good enough. Sheepdog doesn't need to carry on the burden
such as name collision detection, which could be handled very well
(better) by the administration layer by serious users. Remove
block/unblock logic is relatively difficult to understand and possibly
risk the cluster to be blocked for ever (assume any bug that blocks the
cluster but forget unblock it).

By removing it, we get much more (1 simpler code 2 remove deadlock risk)
than lose (just leave the burden to upper layer).

Thanks,
Yuan



More information about the sheepdog mailing list