From: "Yan, Zheng" <zheng.z.yan@xxxxxxxxx> MDS may receives lease renew request while lease is being revoked, just ignore the renew request. Signed-off-by: Yan, Zheng <zheng.z.yan@xxxxxxxxx> --- src/mds/Locker.cc | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index 76708ec..c8cd236 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -2914,18 +2914,20 @@ void Locker::handle_client_lease(MClientLease *m) case CEPH_MDS_LEASE_RENEW: { - dout(7) << "handle_client_lease client." << client - << " renew on " << *dn << dendl; - int pool = 1; // fixme.. do something smart! - m->h.duration_ms = (int)(1000 * mdcache->client_lease_durations[pool]); - m->h.seq = ++l->seq; - m->clear_payload(); - - utime_t now = ceph_clock_now(g_ceph_context); - now += mdcache->client_lease_durations[pool]; - mdcache->touch_client_lease(l, pool, now); - - mds->send_message_client_counted(m, m->get_connection()); + dout(7) << "handle_client_lease client." << client << " renew on " << *dn + << (!dn->lock.can_lease(client)?", revoking lease":"") << dendl; + if (dn->lock.can_lease(client)) { + int pool = 1; // fixme.. do something smart! + m->h.duration_ms = (int)(1000 * mdcache->client_lease_durations[pool]); + m->h.seq = ++l->seq; + m->clear_payload(); + + utime_t now = ceph_clock_now(g_ceph_context); + now += mdcache->client_lease_durations[pool]; + mdcache->touch_client_lease(l, pool, now); + + mds->send_message_client_counted(m, m->get_connection()); + } } break; -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html