On Tue, May 08, 2012 at 03:48:04PM +0800, Yunkai Zhang wrote:
> From: Yunkai Zhang <[email protected]>
> 
> Actually, there are two race problems when we call do_cluster_request()
> in IO threads:
> 1) race on sys->pending_list which would also be updated in 
> sd_notify_handler().
> 2) calling sys->notify() in IO threads other than main thread is also
>    mistake.
> 
> So I move do_cluster_request() into cluster_op_done().

>From the code simplicity POV this looks great, but why do we bother
with using a workqueue at all if just executing in the main thread?

Also I'm a bit worried about blocking operations in ->notify, at least
corosync seems to do blocking network I/O from it.
-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to