]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: introduce XSYN to SYNC lock state transition
authorYan, Zheng <zheng.z.yan@intel.com>
Fri, 4 Jan 2013 02:36:50 +0000 (10:36 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Mon, 28 Jan 2013 02:18:15 +0000 (10:18 +0800)
commit6daec53059b60346eda928fbc7b4d8696cca6041
tree047120a43db000c4a7ae27f4c2953f275e30fa4c
parent671449737599b6d3704e8377c554721ef2c93095
mds: introduce XSYN to SYNC lock state transition

If lock is in XSYN state, Locker::simple_sync() firstly try changing
lock state to EXCL. If it fail to change lock state to EXCL, it just
returns. So Locker::simple_sync() does not guarantee the lock state
eventually changes to SYNC. This issue can cause replica that requests
read lock hang. The fix is introduce an intermediate state for XSYN
to SYNC transition.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/Locker.cc
src/mds/SimpleLock.h
src/mds/locks.c
src/mds/locks.h