From: Xiaoxi Chen Date: Fri, 3 Apr 2015 01:48:43 +0000 (+0800) Subject: Clear removed_collections after reap X-Git-Tag: v9.1.0~242^2~90 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a4d2a53cf6a952ee1e93c2a17e729da13644208f;p=ceph.git Clear removed_collections after reap Previous code forgot to clear the removed_collections queues after reaped the collections in _reap_collection. Signed-off-by: Xiaoxi Chen --- diff --git a/src/os/newstore/NewStore.cc b/src/os/newstore/NewStore.cc index 62a61f08e466..e200c1f7df91 100644 --- a/src/os/newstore/NewStore.cc +++ b/src/os/newstore/NewStore.cc @@ -1043,9 +1043,14 @@ void NewStore::_queue_reap_collection(CollectionRef& c) void NewStore::_reap_collections() { - Mutex::Locker l(reap_lock); - for (list::iterator p = removed_collections.begin(); - p != removed_collections.end(); + reap_lock.Lock(); + + list removed_colls; + removed_colls.swap(removed_collections); + reap_lock.Unlock(); + + for (list::iterator p = removed_colls.begin(); + p != removed_colls.end(); ++p) { CollectionRef c = *p; dout(10) << __func__ << " " << c->cid << dendl;