On 05/03/2012 02:16 PM, tao.peng at emc.com wrote: > Hi list, > > I was reading sheepdog code and noticed that in update_vnode_info(), > if one thread calls get_vnode_info() between > put_vnode_info(current_vnode_info) and current_vnode_info = > vnode_info, it then will get an invalid pointer. So it looks like a > race window there? > > Best, Tao Oops, it seems that we have brought in a big monster, we don't have any lock mechanism to protect current_vnode_info, which is referenced and calculated by worker threads and main thread scattered everywhere in the code and it is really a dilemma to introduce such a ubiquitous lock between worker and main threads. Should we revert the patch introduce current_vnode_info? Thanks, Yuan |