From 1e490eff77205a8277412ad4142882e72db0a8cb Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Wed, 15 Dec 2010 15:37:32 -0800 Subject: [PATCH] osd: timed out watcher is added to unconnected map --- src/osd/OSD.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index ca0366527b87b..a8b9f5ca3e5c4 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1753,8 +1753,13 @@ void OSD::handle_notify_timeout(void *_notif) notif_iter != notif->watchers.end(); ++notif_iter) { map::iterator witer = obc->watchers.find(notif_iter->first); - if (witer != obc->watchers.end()) + if (witer != obc->watchers.end()) { + watch_info_t& w = obc->obs.oi.watchers[notif_iter->first]; obc->watchers.erase(witer); // FIXME: hmm? notify timeout may be different than watch timeout? + utime_t expire = g_clock.now(); + expire += w.timeout_seconds; + obc->unconnected_watchers[notif_iter->first] = expire; + } } obc->lock.Unlock(); watch_lock.Unlock(); /* put_object_context takes osd->lock */ -- 2.39.5