]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: change LOCK_SCAN to unstable state
authorYan, Zheng <zheng.z.yan@intel.com>
Tue, 16 Jul 2013 06:21:21 +0000 (14:21 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Mon, 5 Aug 2013 03:09:07 +0000 (11:09 +0800)
commit8f67adfb696714ae23c1ed4661bef8ab9817f3e2
tree3b8101acf53a85dc563b0a1eca1abcc7c835204a
parentf86828d149f0ae89f49faa83f2a04ee711a22b23
mds: change LOCK_SCAN to unstable state

commit 0071b8e75b (mds: stay in SCAN state in file_eval) makes
Locker::file_eval() ignore lock in LOCK_SCAN state. If there
is no request changes the lock state, the lock can be stuck in
LOCK_SCAN state forever. This can cause client read/write hang
because lock in LOCK_SCAN state does not allow Frw caps.

The fix is change LOCK_SCAN to a unstable state. Thank to the
CInode::STATE_RECOVERING check in Locker::eval_gather(), the
lock stays in the SCAN state while file is being recovering.
The lock will transit to a stable state once the recovery
finishes.

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