diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2012-11-19 10:43:38 +0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-12-01 12:52:22 -0800 |
commit | ff170ecfe2fd8572a98abdeaf4c15a7350556d37 (patch) | |
tree | e2cecf470f8990581e66187615ea252e47ee1bf1 | |
parent | 946b263c108937c0b732217a0ab32d93e3265817 (diff) | |
download | ceph-ff170ecfe2fd8572a98abdeaf4c15a7350556d37.tar.gz |
mds: clear lock flushed if replica is waiting for AC_LOCKFLUSHED
So eval_gather() will not skip calling scatter_writebehind(),
otherwise the replica lock may be in flushing state forever.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
-rw-r--r-- | src/mds/Locker.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index b67b3ee6a52..c500be5f457 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -4404,8 +4404,12 @@ void Locker::handle_file_lock(ScatterLock *lock, MLock *m) if (lock->get_state() == LOCK_MIX_LOCK || lock->get_state() == LOCK_MIX_LOCK2 || lock->get_state() == LOCK_MIX_EXCL || - lock->get_state() == LOCK_MIX_TSYN) + lock->get_state() == LOCK_MIX_TSYN) { lock->decode_locked_state(m->get_data()); + // replica is waiting for AC_LOCKFLUSHED, eval_gather() should not + // delay calling scatter_writebehind(). + lock->clear_flushed(); + } if (lock->is_gathering()) { dout(7) << "handle_file_lock " << *in << " from " << from |