assert(!pending_wbs.empty());
ghobject_t obj(pop_object());
- map<ghobject_t, pair<PendingWB, FDRef> >::iterator i =
+ ceph::unordered_map<ghobject_t, pair<PendingWB, FDRef> >::iterator i =
pending_wbs.find(obj);
*next = boost::make_tuple(obj, i->second.second, i->second.first);
pending_wbs.erase(i);
bool nocache)
{
Mutex::Locker l(lock);
- map<ghobject_t, pair<PendingWB, FDRef> >::iterator wbiter =
+ ceph::unordered_map<ghobject_t, pair<PendingWB, FDRef> >::iterator wbiter =
pending_wbs.find(hoid);
if (wbiter == pending_wbs.end()) {
wbiter = pending_wbs.insert(
void WBThrottle::clear()
{
Mutex::Locker l(lock);
- for (map<ghobject_t, pair<PendingWB, FDRef> >::iterator i =
+ for (ceph::unordered_map<ghobject_t, pair<PendingWB, FDRef> >::iterator i =
pending_wbs.begin();
i != pending_wbs.end();
++i) {
Mutex::Locker l(lock);
while (clearing == hoid)
cond.Wait(lock);
- map<ghobject_t, pair<PendingWB, FDRef> >::iterator i =
+ ceph::unordered_map<ghobject_t, pair<PendingWB, FDRef> >::iterator i =
pending_wbs.find(hoid);
if (i == pending_wbs.end())
return;
#ifndef WBTHROTTLE_H
#define WBTHROTTLE_H
-#include <map>
+#include "include/unordered_map.h"
#include <boost/tuple/tuple.hpp>
#include "include/memory.h"
#include "include/buffer.h"
*/
class WBThrottle : Thread, public md_config_obs_t {
ghobject_t clearing;
-
/* *_limits.first is the start_flusher limit and
* *_limits.second is the hard limit
*/
* Flush objects in lru order
*/
list<ghobject_t> lru;
- map<ghobject_t, list<ghobject_t>::iterator> rev_lru;
+ ceph::unordered_map<ghobject_t, list<ghobject_t>::iterator> rev_lru;
void remove_object(const ghobject_t &oid) {
assert(lock.is_locked());
- map<ghobject_t, list<ghobject_t>::iterator>::iterator iter =
+ ceph::unordered_map<ghobject_t, list<ghobject_t>::iterator>::iterator iter =
rev_lru.find(oid);
if (iter == rev_lru.end())
return;
rev_lru.insert(make_pair(oid, --lru.end()));
}
- map<ghobject_t, pair<PendingWB, FDRef> > pending_wbs;
+ ceph::unordered_map<ghobject_t, pair<PendingWB, FDRef> > pending_wbs;
/// get next flush to perform
bool get_next_should_flush(