I just noticed the parameter comments for gfs2_glock_async_wait are wrong, and I've fixed them in a newer version. I can post the new version after I get people's initial reactions.
Bob ----- Original Message ----- > Because s_vfs_rename_mutex is not cluster-wide, multiple nodes can > reverse the roles of which directories are "old" and which are "new" > for the purposes of rename. This can cause deadlocks where two nodes > can lock old-then-new but since their roles are reversed, they wait > for each other. > > This patch fixes the problem by acquiring all gfs2_rename's inode > glocks asychronously and waits for all glocks to be acquired. > That way all inodes are locked regardless of the order. > > Signed-off-by: Bob Peterson <rpete...@redhat.com> > --- (snip) > + * gfs2_glock_async_wait - wait on multiple asynchronous glock acquisitions > + * @gh: the glock holder (snip) > +int gfs2_glock_async_wait(unsigned int num_gh, struct gfs2_holder *ghs)