]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: implement remote_wrlock
authorSage Weil <sage.weil@dreamhost.com>
Fri, 8 Jul 2011 16:30:29 +0000 (09:30 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Fri, 8 Jul 2011 16:48:00 +0000 (09:48 -0700)
commit025748a69586bbf0615b32b9a4a30effe0ade6da
tree66e682ef966f5496c2b7a62e47dc59497f2d6987
parent4d5b05380e1b683185dd8918942973f10bbb96ae
mds: implement remote_wrlock

For the rename code to behave, we need to hold a wrlock on the slave node
to ensure that any racing gather (mix->lock) is not sent prior to the
_rename_prepare() running; otherwise we violate the locking rules and
corrupt rstats.

Implement a remote_wrlock that will be used by rename.  The wrlock is held
on a remote node instead of the local node, and is set up similarly to
remote_xlocks.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/mds/Locker.cc
src/mds/Locker.h
src/mds/MDCache.cc
src/mds/MDCache.h
src/mds/Server.cc
src/messages/MMDSSlaveRequest.h