]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
common/hobject: eliminate wonky compartors
authorSage Weil <sage@redhat.com>
Fri, 10 Feb 2017 23:47:07 +0000 (18:47 -0500)
committerSage Weil <sage@redhat.com>
Sat, 11 Feb 2017 15:45:16 +0000 (10:45 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
36 files changed:
src/common/hobject.h
src/messages/MOSDSubOp.h
src/os/ObjectStore.h
src/os/bluestore/BlueStore.h
src/os/filestore/DBObjectMap.h
src/os/filestore/FDCache.h
src/os/filestore/FileStore.h
src/os/memstore/MemStore.cc
src/os/memstore/MemStore.h
src/osd/ECBackend.cc
src/osd/ECBackend.h
src/osd/ECMsgTypes.cc
src/osd/ECMsgTypes.h
src/osd/ECTransaction.cc
src/osd/ECTransaction.h
src/osd/OSD.cc
src/osd/OSD.h
src/osd/PG.cc
src/osd/PG.h
src/osd/PGBackend.cc
src/osd/PGBackend.h
src/osd/PGLog.cc
src/osd/PGLog.h
src/osd/PGTransaction.h
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h
src/osd/ReplicatedBackend.cc
src/osd/ReplicatedBackend.h
src/osd/Session.cc
src/osd/Session.h
src/osd/osd_types.cc
src/osd/osd_types.h
src/osdc/Objecter.h
src/test/objectstore/store_test.cc
src/test/osd/TestPGLog.cc
src/test/test_snap_mapper.cc

index 3b7f3b8ef02ee0d04540fc78c24b54be43d8d9f4..1ec236bbd23e1144997b485694974005e26f25b8 100644 (file)
@@ -305,37 +305,6 @@ public:
   friend bool operator==(const hobject_t&, const hobject_t&);
   friend bool operator!=(const hobject_t&, const hobject_t&);
   friend struct ghobject_t;
-
-  struct NibblewiseComparator {
-    bool operator()(const hobject_t& l, const hobject_t& r) const {
-      return cmp(l, r) < 0;
-    }
-  };
-
-  struct BitwiseComparator {
-    bool operator()(const hobject_t& l, const hobject_t& r) const {
-      return cmp(l, r) < 0;
-    }
-  };
-
-  struct Comparator {
-    bool bitwise;
-    explicit Comparator(bool b) : bitwise(b) {}
-    bool operator()(const hobject_t& l, const hobject_t& r) const {
-      return cmp(l, r) < 0;
-    }
-  };
-  struct ComparatorWithDefault {
-    bool bitwise;
-    explicit ComparatorWithDefault(bool b=true) : bitwise(b) {}
-    bool operator()(const hobject_t& l, const hobject_t& r) const {
-      return cmp(l, r) < 0;
-    }
-  };
-  template <typename T>
-  using bitwisemap = std::map<hobject_t, T, BitwiseComparator>;
-
-  using bitwiseset = std::set<hobject_t, BitwiseComparator>;
 };
 WRITE_CLASS_ENCODER(hobject_t)
 
@@ -509,25 +478,6 @@ public:
   friend bool operator==(const ghobject_t&, const ghobject_t&);
   friend bool operator!=(const ghobject_t&, const ghobject_t&);
 
-  struct NibblewiseComparator {
-    bool operator()(const ghobject_t& l, const ghobject_t& r) const {
-      return cmp(l, r) < 0;
-    }
-  };
-
-  struct BitwiseComparator {
-    bool operator()(const ghobject_t& l, const ghobject_t& r) const {
-      return cmp(l, r) < 0;
-    }
-  };
-
-  struct Comparator {
-    bool bitwise;
-    explicit Comparator(bool b) : bitwise(b) {}
-    bool operator()(const ghobject_t& l, const ghobject_t& r) const {
-      return cmp(l, r) < 0;
-    }
-  };
 };
 WRITE_CLASS_ENCODER(ghobject_t)
 
index 615e8a5c8b8996eddc2634721cd18e4f963ae020..cfc3afc4af4108c016083d4de1e6c6f46b720405 100644 (file)
@@ -70,7 +70,7 @@ public:
   map<string,bufferlist> attrset;
 
   interval_set<uint64_t> data_subset;
-  map<hobject_t, interval_set<uint64_t>, hobject_t::BitwiseComparator> clone_subsets;
+  map<hobject_t, interval_set<uint64_t>> clone_subsets;
 
   bool first, complete;
 
index c1ebc40e7c9494e7be83e81dc7fddcb383405316..03b153372c0aa075dec174e22a94ecf6e98fc52c 100644 (file)
@@ -475,7 +475,7 @@ public:
     void *osr {nullptr}; // NULL on replay
 
     map<coll_t, __le32> coll_index;
-    map<ghobject_t, __le32, ghobject_t::BitwiseComparator> object_index;
+    map<ghobject_t, __le32> object_index;
 
     __le32 coll_id {0};
     __le32 object_id {0};
@@ -748,7 +748,7 @@ public:
       }
 
       vector<__le32> om(other.object_index.size());
-      map<ghobject_t, __le32, ghobject_t::BitwiseComparator>::iterator object_index_p;
+      map<ghobject_t, __le32>::iterator object_index_p;
       for (object_index_p = other.object_index.begin();
            object_index_p != other.object_index.end();
            ++object_index_p) {
@@ -894,7 +894,7 @@ public:
           colls[coll_index_p->second] = coll_index_p->first;
         }
 
-        map<ghobject_t, __le32, ghobject_t::BitwiseComparator>::iterator object_index_p;
+        map<ghobject_t, __le32>::iterator object_index_p;
         for (object_index_p = t->object_index.begin();
              object_index_p != t->object_index.end();
              ++object_index_p) {
@@ -996,7 +996,7 @@ private:
       return index_id;
     }
     __le32 _get_object_id(const ghobject_t& oid) {
-      map<ghobject_t, __le32, ghobject_t::BitwiseComparator>::iterator o = object_index.find(oid);
+      map<ghobject_t, __le32>::iterator o = object_index.find(oid);
       if (o != object_index.end())
         return o->second;
 
index 2b401ef84fee983e9677a3ac9dca6259cd9e7ae3..92fef811aae99a9b11b848c6483a5938f85875c4 100644 (file)
@@ -1640,8 +1640,8 @@ private:
   list<CollectionRef> removed_collections;
 
   RWLock debug_read_error_lock;
-  set<ghobject_t, ghobject_t::BitwiseComparator> debug_data_error_objects;
-  set<ghobject_t, ghobject_t::BitwiseComparator> debug_mdata_error_objects;
+  set<ghobject_t> debug_data_error_objects;
+  set<ghobject_t> debug_mdata_error_objects;
 
   std::atomic<int> csum_type;
 
index 8be514377c442921f3e1b6cfa115450c23e3d67b..2fb411d753cfe1cf98bec7199bb08d5489733415 100644 (file)
@@ -70,7 +70,7 @@ public:
    * Set of headers currently in use
    */
   set<uint64_t> in_use;
-  set<ghobject_t, ghobject_t::BitwiseComparator> map_header_in_use;
+  set<ghobject_t> map_header_in_use;
 
   /**
    * Takes the map_header_in_use entry in constructor, releases in
@@ -331,7 +331,7 @@ private:
   /// Implicit lock on Header->seq
   typedef ceph::shared_ptr<_Header> Header;
   Mutex cache_lock;
-  SimpleLRU<ghobject_t, _Header, ghobject_t::BitwiseComparator> caches;
+  SimpleLRU<ghobject_t, _Header> caches;
 
   string map_header_key(const ghobject_t &oid);
   string header_key(uint64_t seq);
index 0677afa1ba45f3d31ebf01740eeb308a2912e439..4fdb8409db21a1466503e32bb8a7dec73eb3fae3 100644 (file)
@@ -52,14 +52,14 @@ public:
 private:
   CephContext *cct;
   const int registry_shards;
-  SharedLRU<ghobject_t, FD, ghobject_t::BitwiseComparator> *registry;
+  SharedLRU<ghobject_t, FD> *registry;
 
 public:
   explicit FDCache(CephContext *cct) : cct(cct),
   registry_shards(MAX(cct->_conf->filestore_fd_cache_shards, 1)) {
     assert(cct);
     cct->_conf->add_observer(this);
-    registry = new SharedLRU<ghobject_t, FD, ghobject_t::BitwiseComparator>[registry_shards];
+    registry = new SharedLRU<ghobject_t, FD>[registry_shards];
     for (int i = 0; i < registry_shards; ++i) {
       registry[i].set_cct(cct);
       registry[i].set_size(
index 4a0656fc1f7d114f48941824e23d9aa04e4eae74..d7e66c10c3994ab42a259a5fa543b798b2797f84 100644 (file)
@@ -627,8 +627,8 @@ public:
 
   // DEBUG read error injection, an object is removed from both on delete()
   Mutex read_error_lock;
-  set<ghobject_t, ghobject_t::BitwiseComparator> data_error_set; // read() will return -EIO
-  set<ghobject_t, ghobject_t::BitwiseComparator> mdata_error_set; // getattr(),stat() will return -EIO
+  set<ghobject_t> data_error_set; // read() will return -EIO
+  set<ghobject_t> mdata_error_set; // getattr(),stat() will return -EIO
   void inject_data_error(const ghobject_t &oid);
   void inject_mdata_error(const ghobject_t &oid);
   void debug_obj_on_delete(const ghobject_t &oid);
index d27557b87276192641ab4fa31c10abf0903aaa33..3415227bb6359e9481f337d6b5dbbc528f168cc0 100644 (file)
@@ -120,7 +120,7 @@ void MemStore::dump(Formatter *f)
     f->close_section();
 
     f->open_array_section("objects");
-    for (map<ghobject_t,ObjectRef,ghobject_t::BitwiseComparator>::iterator q = p->second->object_map.begin();
+    for (map<ghobject_t,ObjectRef>::iterator q = p->second->object_map.begin();
         q != p->second->object_map.end();
         ++q) {
       f->open_object_section("object");
@@ -473,7 +473,7 @@ int MemStore::collection_list(const coll_t& cid,
 
   dout(10) << __func__ << " cid " << cid << " start " << start
           << " end " << end << dendl;
-  map<ghobject_t,ObjectRef,ghobject_t::BitwiseComparator>::iterator p = c->object_map.lower_bound(start);
+  map<ghobject_t,ObjectRef>::iterator p = c->object_map.lower_bound(start);
   while (p != c->object_map.end() &&
         ls->size() < (unsigned)max &&
         p->first < end) {
@@ -1445,7 +1445,7 @@ int MemStore::_split_collection(const coll_t& cid, uint32_t bits, uint32_t match
   RWLock::WLocker l1(MIN(&(*sc), &(*dc))->lock);
   RWLock::WLocker l2(MAX(&(*sc), &(*dc))->lock);
 
-  map<ghobject_t,ObjectRef,ghobject_t::BitwiseComparator>::iterator p = sc->object_map.begin();
+  map<ghobject_t,ObjectRef>::iterator p = sc->object_map.begin();
   while (p != sc->object_map.end()) {
     if (p->first.match(bits, match)) {
       dout(20) << " moving " << p->first << dendl;
index b28b3ba78eae9aaccda484487b062665c95d0303..286351c400baaba92d9c7c69ecb20b952fd79bce 100644 (file)
@@ -99,7 +99,7 @@ public:
     CephContext *cct;
     bool use_page_set;
     ceph::unordered_map<ghobject_t, ObjectRef> object_hash;  ///< for lookup
-    map<ghobject_t, ObjectRef,ghobject_t::BitwiseComparator> object_map;        ///< for iteration
+    map<ghobject_t, ObjectRef> object_map;        ///< for iteration
     map<string,bufferptr> xattr;
     RWLock lock;   ///< for object_{map,hash}
     bool exists;
@@ -141,7 +141,7 @@ public:
       ::encode(use_page_set, bl);
       uint32_t s = object_map.size();
       ::encode(s, bl);
-      for (map<ghobject_t, ObjectRef,ghobject_t::BitwiseComparator>::const_iterator p = object_map.begin();
+      for (map<ghobject_t, ObjectRef>::const_iterator p = object_map.begin();
           p != object_map.end();
           ++p) {
        ::encode(p->first, bl);
@@ -168,7 +168,7 @@ public:
 
     uint64_t used_bytes() const {
       uint64_t result = 0;
-      for (map<ghobject_t, ObjectRef,ghobject_t::BitwiseComparator>::const_iterator p = object_map.begin();
+      for (map<ghobject_t, ObjectRef>::const_iterator p = object_map.begin();
           p != object_map.end();
           ++p) {
         result += p->second->get_size();
index faecd1c3aa6fdad7fc2d5437ae1e387d68636b9d..d697843f33ad94717331d9509bc3e0d982335293 100644 (file)
@@ -251,7 +251,7 @@ struct OnRecoveryReadComplete :
 
 struct RecoveryMessages {
   map<hobject_t,
-      ECBackend::read_request_t, hobject_t::BitwiseComparator> reads;
+      ECBackend::read_request_t> reads;
   void read(
     ECBackend *ec,
     const hobject_t &hoid, uint64_t off, uint64_t len,
@@ -888,7 +888,7 @@ void ECBackend::handle_sub_write(
     add_temp_objs(op.temp_added);
   }
   if (op.backfill) {
-    for (set<hobject_t, hobject_t::BitwiseComparator>::iterator i = op.temp_removed.begin();
+    for (set<hobject_t>::iterator i = op.temp_removed.begin();
         i != op.temp_removed.end();
         ++i) {
       dout(10) << __func__ << ": removing object " << *i
@@ -941,7 +941,7 @@ void ECBackend::handle_sub_read(
   ECSubReadReply *reply)
 {
   shard_id_t shard = get_parent()->whoami_shard().shard;
-  for(map<hobject_t, list<boost::tuple<uint64_t, uint64_t, uint32_t> >, hobject_t::BitwiseComparator>::iterator i =
+  for(map<hobject_t, list<boost::tuple<uint64_t, uint64_t, uint32_t> >>::iterator i =
         op.to_read.begin();
       i != op.to_read.end();
       ++i) {
@@ -1012,7 +1012,7 @@ error:
     reply->buffers_read.erase(i->first);
     reply->errors[i->first] = r;
   }
-  for (set<hobject_t, hobject_t::BitwiseComparator>::iterator i = op.attrs_to_read.begin();
+  for (set<hobject_t>::iterator i = op.attrs_to_read.begin();
        i != op.attrs_to_read.end();
        ++i) {
     dout(10) << __func__ << ": fulfilling attr request on "
@@ -1077,7 +1077,7 @@ void ECBackend::handle_sub_read_reply(
     return;
   }
   ReadOp &rop = iter->second;
-  for (map<hobject_t, list<pair<uint64_t, bufferlist> >, hobject_t::BitwiseComparator>::iterator i =
+  for (map<hobject_t, list<pair<uint64_t, bufferlist> >>::iterator i =
         op.buffers_read.begin();
        i != op.buffers_read.end();
        ++i) {
@@ -1105,7 +1105,7 @@ void ECBackend::handle_sub_read_reply(
       riter->get<2>()[from].claim(j->second);
     }
   }
-  for (map<hobject_t, map<string, bufferlist>, hobject_t::BitwiseComparator>::iterator i = op.attrs_read.begin();
+  for (map<hobject_t, map<string, bufferlist>>::iterator i = op.attrs_read.begin();
        i != op.attrs_read.end();
        ++i) {
     assert(!op.errors.count(i->first));        // if read error better not have sent an attribute
@@ -1117,7 +1117,7 @@ void ECBackend::handle_sub_read_reply(
     rop.complete[i->first].attrs = map<string, bufferlist>();
     (*(rop.complete[i->first].attrs)).swap(i->second);
   }
-  for (map<hobject_t, int, hobject_t::BitwiseComparator>::iterator i = op.errors.begin();
+  for (map<hobject_t, int>::iterator i = op.errors.begin();
        i != op.errors.end();
        ++i) {
     rop.complete[i->first].errors.insert(
@@ -1207,9 +1207,9 @@ void ECBackend::handle_sub_read_reply(
 
 void ECBackend::complete_read_op(ReadOp &rop, RecoveryMessages *m)
 {
-  map<hobject_t, read_request_t, hobject_t::BitwiseComparator>::iterator reqiter =
+  map<hobject_t, read_request_t>::iterator reqiter =
     rop.to_read.begin();
-  map<hobject_t, read_result_t, hobject_t::BitwiseComparator>::iterator resiter =
+  map<hobject_t, read_result_t>::iterator resiter =
     rop.complete.begin();
   assert(rop.to_read.size() == rop.complete.size());
   for (; reqiter != rop.to_read.end(); ++reqiter, ++resiter) {
@@ -1241,8 +1241,8 @@ void ECBackend::filter_read_op(
   const OSDMapRef& osdmap,
   ReadOp &op)
 {
-  set<hobject_t, hobject_t::BitwiseComparator> to_cancel;
-  for (map<pg_shard_t, set<hobject_t, hobject_t::BitwiseComparator> >::iterator i = op.source_to_obj.begin();
+  set<hobject_t> to_cancel;
+  for (map<pg_shard_t, set<hobject_t> >::iterator i = op.source_to_obj.begin();
        i != op.source_to_obj.end();
        ++i) {
     if (osdmap->is_down(i->first.osd)) {
@@ -1255,10 +1255,10 @@ void ECBackend::filter_read_op(
   if (to_cancel.empty())
     return;
 
-  for (map<pg_shard_t, set<hobject_t, hobject_t::BitwiseComparator> >::iterator i = op.source_to_obj.begin();
+  for (map<pg_shard_t, set<hobject_t> >::iterator i = op.source_to_obj.begin();
        i != op.source_to_obj.end();
        ) {
-    for (set<hobject_t, hobject_t::BitwiseComparator>::iterator j = i->second.begin();
+    for (set<hobject_t>::iterator j = i->second.begin();
         j != i->second.end();
         ) {
       if (to_cancel.count(*j))
@@ -1274,7 +1274,7 @@ void ECBackend::filter_read_op(
     }
   }
 
-  for (set<hobject_t, hobject_t::BitwiseComparator>::iterator i = to_cancel.begin();
+  for (set<hobject_t>::iterator i = to_cancel.begin();
        i != to_cancel.end();
        ++i) {
     get_parent()->cancel_pull(*i);
@@ -1341,7 +1341,7 @@ void ECBackend::on_change()
        i != tid_to_read_map.end();
        ++i) {
     dout(10) << __func__ << ": cancelling " << i->second << dendl;
-    for (map<hobject_t, read_request_t, hobject_t::BitwiseComparator>::iterator j =
+    for (map<hobject_t, read_request_t>::iterator j =
           i->second.to_read.begin();
         j != i->second.to_read.end();
         ++j) {
@@ -1367,7 +1367,7 @@ void ECBackend::on_flushed()
 void ECBackend::dump_recovery_info(Formatter *f) const
 {
   f->open_array_section("recovery_ops");
-  for (map<hobject_t, RecoveryOp, hobject_t::BitwiseComparator>::const_iterator i = recovery_ops.begin();
+  for (map<hobject_t, RecoveryOp>::const_iterator i = recovery_ops.begin();
        i != recovery_ops.end();
        ++i) {
     f->open_object_section("op");
@@ -1482,7 +1482,7 @@ int ECBackend::get_min_avail_to_read_shards(
       }
     }
 
-    map<hobject_t, set<pg_shard_t>, hobject_t::BitwiseComparator>::const_iterator miter =
+    map<hobject_t, set<pg_shard_t>>::const_iterator miter =
       get_parent()->get_missing_loc_shards().find(hoid);
     if (miter != get_parent()->get_missing_loc_shards().end()) {
       for (set<pg_shard_t>::iterator i = miter->second.begin();
@@ -1557,7 +1557,7 @@ int ECBackend::get_remaining_shards(
 
 void ECBackend::start_read_op(
   int priority,
-  map<hobject_t, read_request_t, hobject_t::BitwiseComparator> &to_read,
+  map<hobject_t, read_request_t> &to_read,
   OpRequestRef _op,
   bool do_redundant_reads,
   bool for_recovery)
@@ -1586,8 +1586,7 @@ void ECBackend::do_read_op(ReadOp &op)
   dout(10) << __func__ << ": starting read " << op << dendl;
 
   map<pg_shard_t, ECSubRead> messages;
-  for (map<hobject_t, read_request_t,
-           hobject_t::BitwiseComparator>::iterator i = op.to_read.begin();
+  for (map<hobject_t, read_request_t>::iterator i = op.to_read.begin();
        i != op.to_read.end();
        ++i) {
     bool need_attrs = i->second.want_attrs;
@@ -1785,7 +1784,7 @@ bool ECBackend::try_state_to_reads()
     assert(get_parent()->get_pool().is_hacky_ecoverwrites());
     objects_read_async_no_cache(
       op->remote_read,
-      [this, op](hobject_t::bitwisemap<pair<int, extent_map> > &&results) {
+      [this, op](map<hobject_t,pair<int, extent_map> > &&results) {
        for (auto &&i: results) {
          op->remote_read_result.emplace(i.first, i.second.second);
        }
@@ -1834,7 +1833,7 @@ bool ECBackend::try_reads_to_commit()
     trans[i->shard];
   }
 
-  hobject_t::bitwisemap<extent_map> written;
+  map<hobject_t,extent_map> written;
   if (op->plan.t) {
     ECTransaction::generate_transactions(
       op->plan,
@@ -1865,7 +1864,7 @@ bool ECBackend::try_reads_to_commit()
     }
   }
 
-  hobject_t::bitwisemap<extent_set> written_set;
+  map<hobject_t,extent_set> written_set;
   for (auto &&i: written) {
     written_set[i.first] = i.second.get_interval_set();
   }
@@ -2016,7 +2015,7 @@ void ECBackend::objects_read_async(
   Context *on_complete,
   bool fast_read)
 {
-  hobject_t::bitwisemap<std::list<boost::tuple<uint64_t, uint64_t, uint32_t> > >
+  map<hobject_t,std::list<boost::tuple<uint64_t, uint64_t, uint32_t> > >
     reads;
 
   uint32_t flags = 0;
@@ -2066,7 +2065,7 @@ void ECBackend::objects_read_async(
        hoid(hoid),
        to_read(to_read),
        on_complete(on_complete) {}
-    void operator()(hobject_t::bitwisemap<pair<int, extent_map> > &&results) {
+    void operator()(map<hobject_t,pair<int, extent_map> > &&results) {
       auto dpp = ec->get_parent()->get_dpp();
       ldpp_dout(dpp, 20) << "objects_read_async_cb: got: " << results
                         << dendl;
@@ -2119,7 +2118,7 @@ void ECBackend::objects_read_async(
     reads,
     fast_read,
     make_gen_lambda_context<
-      hobject_t::bitwisemap<pair<int, extent_map> > &&, cb>(
+      map<hobject_t,pair<int, extent_map> > &&, cb>(
        cb(this,
           hoid,
           to_read,
@@ -2186,11 +2185,11 @@ out:
 };
 
 void ECBackend::objects_read_and_reconstruct(
-  const hobject_t::bitwisemap<
+  const map<hobject_t,
     std::list<boost::tuple<uint64_t, uint64_t, uint32_t> >
   > &reads,
   bool fast_read,
-  GenContextURef<hobject_t::bitwisemap<pair<int, extent_map> > &&> &&func)
+  GenContextURef<map<hobject_t,pair<int, extent_map> > &&> &&func)
 {
   in_progress_client_reads.emplace_back(
     reads.size(), std::move(func));
@@ -2202,7 +2201,7 @@ void ECBackend::objects_read_and_reconstruct(
   set<int> want_to_read;
   get_want_to_read_shards(&want_to_read);
     
-  map<hobject_t, read_request_t, hobject_t::BitwiseComparator> for_read_op;
+  map<hobject_t, read_request_t> for_read_op;
   for (auto &&to_read: reads) {
     set<pg_shard_t> shards;
     int r = get_min_avail_to_read_shards(
@@ -2261,7 +2260,7 @@ int ECBackend::send_all_remaining_reads(
   GenContext<pair<RecoveryMessages *, read_result_t& > &> *c =
     rop.to_read.find(hoid)->second.cb;
 
-  map<hobject_t, read_request_t, hobject_t::BitwiseComparator> for_read_op;
+  map<hobject_t, read_request_t> for_read_op;
   for_read_op.insert(
     make_pair(
       hoid,
index 526112197f1600c1e540ecef9a27a865bf539d63..555ca38d148767c0937e6eb05ce89f6ccf76052f 100644 (file)
@@ -137,20 +137,19 @@ public:
    * check_recovery_sources.
    */
   void objects_read_and_reconstruct(
-    const hobject_t::bitwisemap<
-      std::list<boost::tuple<uint64_t, uint64_t, uint32_t> >
+    const map<hobject_t, std::list<boost::tuple<uint64_t, uint64_t, uint32_t> >
     > &reads,
     bool fast_read,
-    GenContextURef<hobject_t::bitwisemap<pair<int, extent_map> > &&> &&func);
+    GenContextURef<map<hobject_t,pair<int, extent_map> > &&> &&func);
 
   friend struct CallClientContexts;
   struct ClientAsyncReadStatus {
     unsigned objects_to_read;
-    GenContextURef<hobject_t::bitwisemap<pair<int, extent_map> > &&> func;
-    hobject_t::bitwisemap<pair<int, extent_map> > results;
+    GenContextURef<map<hobject_t,pair<int, extent_map> > &&> func;
+    map<hobject_t,pair<int, extent_map> > results;
     explicit ClientAsyncReadStatus(
       unsigned objects_to_read,
-      GenContextURef<hobject_t::bitwisemap<pair<int, extent_map> > &&> &&func)
+      GenContextURef<map<hobject_t,pair<int, extent_map> > &&> &&func)
       : objects_to_read(objects_to_read), func(std::move(func)) {}
     void complete_object(
       const hobject_t &hoid,
@@ -178,10 +177,9 @@ public:
 
   template <typename Func>
   void objects_read_async_no_cache(
-    const hobject_t::bitwisemap<extent_set> &to_read,
+    const map<hobject_t,extent_set> &to_read,
     Func &&on_complete) {
-    hobject_t::bitwisemap<
-      std::list<boost::tuple<uint64_t, uint64_t, uint32_t> > > _to_read;
+    map<hobject_t,std::list<boost::tuple<uint64_t, uint64_t, uint32_t> > > _to_read;
     for (auto &&hpair: to_read) {
       auto &l = _to_read[hpair.first];
       for (auto extent: hpair.second) {
@@ -192,7 +190,7 @@ public:
       _to_read,
       false,
       make_gen_lambda_context<
-        hobject_t::bitwisemap<pair<int, extent_map> > &&, Func>(
+      map<hobject_t,pair<int, extent_map> > &&, Func>(
          std::forward<Func>(on_complete)));
   }
   void kick_reads() {
@@ -294,7 +292,7 @@ private:
     RecoveryOp() : state(IDLE) {}
   };
   friend ostream &operator<<(ostream &lhs, const RecoveryOp &rhs);
-  map<hobject_t, RecoveryOp, hobject_t::BitwiseComparator> recovery_ops;
+  map<hobject_t, RecoveryOp> recovery_ops;
 
   void continue_recovery_op(
     RecoveryOp &op,
@@ -372,11 +370,11 @@ public:
     // of the available shards.
     bool for_recovery;
 
-    map<hobject_t, read_request_t, hobject_t::BitwiseComparator> to_read;
-    map<hobject_t, read_result_t, hobject_t::BitwiseComparator> complete;
+    map<hobject_t, read_request_t> to_read;
+    map<hobject_t, read_result_t> complete;
 
-    map<hobject_t, set<pg_shard_t>, hobject_t::BitwiseComparator> obj_to_source;
-    map<pg_shard_t, set<hobject_t, hobject_t::BitwiseComparator> > source_to_obj;
+    map<hobject_t, set<pg_shard_t>> obj_to_source;
+    map<pg_shard_t, set<hobject_t> > source_to_obj;
 
     void dump(Formatter *f) const;
 
@@ -388,7 +386,7 @@ public:
       bool do_redundant_reads,
       bool for_recovery,
       OpRequestRef op,
-      map<hobject_t, read_request_t, hobject_t::BitwiseComparator> &&_to_read)
+      map<hobject_t, read_request_t> &&_to_read)
       : priority(priority), tid(tid), op(op), do_redundant_reads(do_redundant_reads),
        for_recovery(for_recovery), to_read(std::move(_to_read)) {
       for (auto &&hpair: to_read) {
@@ -416,7 +414,7 @@ public:
   map<pg_shard_t, set<ceph_tid_t> > shard_to_read_map;
   void start_read_op(
     int priority,
-    map<hobject_t, read_request_t, hobject_t::BitwiseComparator> &to_read,
+    map<hobject_t, read_request_t> &to_read,
     OpRequestRef op,
     bool do_redundant_reads, bool for_recovery);
 
@@ -453,14 +451,14 @@ public:
     eversion_t roll_forward_to; /// Soon to be generated internally
 
     /// Ancillary also provided from submit_transaction caller
-    map<hobject_t, ObjectContextRef, hobject_t::BitwiseComparator> obc_map;
+    map<hobject_t, ObjectContextRef> obc_map;
 
     /// see call_write_ordered
     std::list<std::function<void(void)> > on_write;
 
     /// Generated internally
-    set<hobject_t, hobject_t::BitwiseComparator> temp_added;
-    set<hobject_t, hobject_t::BitwiseComparator> temp_cleared;
+    set<hobject_t> temp_added;
+    set<hobject_t> temp_cleared;
 
     ECTransaction::WritePlan plan;
     bool requires_rmw() const { return !plan.to_read.empty(); }
@@ -470,9 +468,9 @@ public:
     bool using_cache = false;
 
     /// In progress read state;
-    hobject_t::bitwisemap<extent_set> pending_read; // subset already being read
-    hobject_t::bitwisemap<extent_set> remote_read;  // subset we must read
-    hobject_t::bitwisemap<extent_map> remote_read_result;
+    map<hobject_t,extent_set> pending_read; // subset already being read
+    map<hobject_t,extent_set> remote_read;  // subset we must read
+    map<hobject_t,extent_map> remote_read_result;
     bool read_in_progress() const {
       return !remote_read.empty() && remote_read_result.empty();
     }
@@ -614,7 +612,7 @@ public:
 
   const ECUtil::stripe_info_t sinfo;
   /// If modified, ensure that the ref is held until the update is applied
-  SharedPtrRegistry<hobject_t, ECUtil::HashInfo, hobject_t::BitwiseComparator> unstable_hashinfo_registry;
+  SharedPtrRegistry<hobject_t, ECUtil::HashInfo> unstable_hashinfo_registry;
   ECUtil::HashInfoRef get_hash_info(const hobject_t &hoid, bool checks = true,
                                    const map<string,bufferptr> *attr = NULL);
 
index 2223e7f91a366524e604282448752d89487ef356..499784a8665f6ba93b3cee00a8f368cb7180efbf 100644 (file)
@@ -169,8 +169,8 @@ void ECSubRead::encode(bufferlist &bl, uint64_t features) const
     ENCODE_START(1, 1, bl);
     ::encode(from, bl);
     ::encode(tid, bl);
-    map<hobject_t, list<pair<uint64_t, uint64_t> >, hobject_t::BitwiseComparator> tmp;
-    for (map<hobject_t, list<boost::tuple<uint64_t, uint64_t, uint32_t> >, hobject_t::BitwiseComparator>::const_iterator m = to_read.begin();
+    map<hobject_t, list<pair<uint64_t, uint64_t> >> tmp;
+    for (map<hobject_t, list<boost::tuple<uint64_t, uint64_t, uint32_t> >>::const_iterator m = to_read.begin();
          m != to_read.end(); ++m) {
       list<pair<uint64_t, uint64_t> > tlist;
       for (list<boost::tuple<uint64_t, uint64_t, uint32_t> >::const_iterator l = m->second.begin();
@@ -199,9 +199,9 @@ void ECSubRead::decode(bufferlist::iterator &bl)
   ::decode(from, bl);
   ::decode(tid, bl);
   if (struct_v == 1) {
-    map<hobject_t, list<pair<uint64_t, uint64_t> >, hobject_t::BitwiseComparator>tmp;
+    map<hobject_t, list<pair<uint64_t, uint64_t> >>tmp;
     ::decode(tmp, bl);
-    for (map<hobject_t, list<pair<uint64_t, uint64_t> >, hobject_t::BitwiseComparator>::const_iterator m = tmp.begin();
+    for (map<hobject_t, list<pair<uint64_t, uint64_t> >>::const_iterator m = tmp.begin();
          m != tmp.end(); ++m) {
       list<boost::tuple<uint64_t, uint64_t, uint32_t> > tlist;
       for (list<pair<uint64_t, uint64_t> > ::const_iterator l = m->second.begin();
@@ -231,7 +231,7 @@ void ECSubRead::dump(Formatter *f) const
   f->dump_stream("from") << from;
   f->dump_unsigned("tid", tid);
   f->open_array_section("objects");
-  for (map<hobject_t, list<boost::tuple<uint64_t, uint64_t, uint32_t> >, hobject_t::BitwiseComparator>::const_iterator i =
+  for (map<hobject_t, list<boost::tuple<uint64_t, uint64_t, uint32_t> >>::const_iterator i =
         to_read.begin();
        i != to_read.end();
        ++i) {
@@ -254,7 +254,7 @@ void ECSubRead::dump(Formatter *f) const
   f->close_section();
 
   f->open_array_section("object_attrs_requested");
-  for (set<hobject_t,hobject_t::BitwiseComparator>::const_iterator i = attrs_to_read.begin();
+  for (set<hobject_t>::const_iterator i = attrs_to_read.begin();
        i != attrs_to_read.end();
        ++i) {
     f->open_object_section("object");
@@ -320,7 +320,7 @@ void ECSubReadReply::dump(Formatter *f) const
   f->dump_stream("from") << from;
   f->dump_unsigned("tid", tid);
   f->open_array_section("buffers_read");
-  for (map<hobject_t, list<pair<uint64_t, bufferlist> >, hobject_t::BitwiseComparator>::const_iterator i =
+  for (map<hobject_t, list<pair<uint64_t, bufferlist> >>::const_iterator i =
         buffers_read.begin();
        i != buffers_read.end();
        ++i) {
@@ -342,7 +342,7 @@ void ECSubReadReply::dump(Formatter *f) const
   f->close_section();
 
   f->open_array_section("attrs_returned");
-  for (map<hobject_t, map<string, bufferlist>, hobject_t::BitwiseComparator>::const_iterator i =
+  for (map<hobject_t, map<string, bufferlist>>::const_iterator i =
         attrs_read.begin();
        i != attrs_read.end();
        ++i) {
@@ -363,7 +363,7 @@ void ECSubReadReply::dump(Formatter *f) const
   f->close_section();
 
   f->open_array_section("errors");
-  for (map<hobject_t, int, hobject_t::BitwiseComparator>::const_iterator i = errors.begin();
+  for (map<hobject_t, int>::const_iterator i = errors.begin();
        i != errors.end();
        ++i) {
     f->open_object_section("error_pair");
index d28b6efa7df22946e4adab29c812091c95e43b44..bfcb5361ae1f04c4be19862c14cbbb85a666f802 100644 (file)
@@ -31,8 +31,8 @@ struct ECSubWrite {
   eversion_t trim_to;
   eversion_t roll_forward_to;
   vector<pg_log_entry_t> log_entries;
-  set<hobject_t, hobject_t::BitwiseComparator> temp_added;
-  set<hobject_t, hobject_t::BitwiseComparator> temp_removed;
+  set<hobject_t> temp_added;
+  set<hobject_t> temp_removed;
   boost::optional<pg_hit_set_history_t> updated_hit_set_history;
   bool backfill = false;
   ECSubWrite() : tid(0) {}
@@ -48,8 +48,8 @@ struct ECSubWrite {
     eversion_t roll_forward_to,
     vector<pg_log_entry_t> log_entries,
     boost::optional<pg_hit_set_history_t> updated_hit_set_history,
-    const set<hobject_t, hobject_t::BitwiseComparator> &temp_added,
-    const set<hobject_t, hobject_t::BitwiseComparator> &temp_removed,
+    const set<hobject_t> &temp_added,
+    const set<hobject_t> &temp_removed,
     bool backfill)
     : from(from), tid(tid), reqid(reqid),
       soid(soid), stats(stats), t(t),
@@ -105,8 +105,8 @@ WRITE_CLASS_ENCODER(ECSubWriteReply)
 struct ECSubRead {
   pg_shard_t from;
   ceph_tid_t tid;
-  map<hobject_t, list<boost::tuple<uint64_t, uint64_t, uint32_t> >, hobject_t::BitwiseComparator> to_read;
-  set<hobject_t, hobject_t::BitwiseComparator> attrs_to_read;
+  map<hobject_t, list<boost::tuple<uint64_t, uint64_t, uint32_t> >> to_read;
+  set<hobject_t> attrs_to_read;
   void encode(bufferlist &bl, uint64_t features) const;
   void decode(bufferlist::iterator &bl);
   void dump(Formatter *f) const;
@@ -117,9 +117,9 @@ WRITE_CLASS_ENCODER_FEATURES(ECSubRead)
 struct ECSubReadReply {
   pg_shard_t from;
   ceph_tid_t tid;
-  map<hobject_t, list<pair<uint64_t, bufferlist> >, hobject_t::BitwiseComparator> buffers_read;
-  map<hobject_t, map<string, bufferlist>, hobject_t::BitwiseComparator> attrs_read;
-  map<hobject_t, int, hobject_t::BitwiseComparator> errors;
+  map<hobject_t, list<pair<uint64_t, bufferlist> >> buffers_read;
+  map<hobject_t, map<string, bufferlist>> attrs_read;
+  map<hobject_t, int> errors;
   void encode(bufferlist &bl) const;
   void decode(bufferlist::iterator &bl);
   void dump(Formatter *f) const;
index 4cb76d0f4eaa01dace306a2f67be7d65413f36d4..3119778664265e14daf9aee0eb2186fccc44e006 100644 (file)
@@ -101,12 +101,12 @@ void ECTransaction::generate_transactions(
   pg_t pgid,
   bool legacy_log_entries,
   const ECUtil::stripe_info_t &sinfo,
-  const hobject_t::bitwisemap<extent_map> &partial_extents,
+  const map<hobject_t,extent_map> &partial_extents,
   vector<pg_log_entry_t> &entries,
-  hobject_t::bitwisemap<extent_map> *written_map,
+  map<hobject_t,extent_map> *written_map,
   map<shard_id_t, ObjectStore::Transaction> *transactions,
-  set<hobject_t, hobject_t::BitwiseComparator> *temp_added,
-  set<hobject_t, hobject_t::BitwiseComparator> *temp_removed,
+  set<hobject_t> *temp_added,
+  set<hobject_t> *temp_removed,
   DoutPrefixProvider *dpp)
 {
   assert(written_map);
@@ -122,7 +122,7 @@ void ECTransaction::generate_transactions(
   assert(temp_added);
   assert(temp_removed);
 
-  map<hobject_t, pg_log_entry_t*, hobject_t::BitwiseComparator> obj_to_log;
+  map<hobject_t, pg_log_entry_t*> obj_to_log;
   for (auto &&i: entries) {
     obj_to_log.insert(make_pair(i.soid, &i));
   }
index a284167993506d681571e86d61f4d88a30e3d742..346dcd146f3b040cc57197daf7f148c5ffa82cf0 100644 (file)
@@ -26,10 +26,10 @@ namespace ECTransaction {
   struct WritePlan {
     PGTransactionUPtr t;
     bool invalidates_cache = false; // Yes, both are possible
-    hobject_t::bitwisemap<extent_set> to_read;
-    hobject_t::bitwisemap<extent_set> will_write; // superset of to_read
+    map<hobject_t,extent_set> to_read;
+    map<hobject_t,extent_set> will_write; // superset of to_read
 
-    hobject_t::bitwisemap<ECUtil::HashInfoRef> hash_infos;
+    map<hobject_t,ECUtil::HashInfoRef> hash_infos;
   };
 
   bool requires_overwrite(
@@ -182,12 +182,12 @@ namespace ECTransaction {
     pg_t pgid,
     bool legacy_log_entries,
     const ECUtil::stripe_info_t &sinfo,
-    const hobject_t::bitwisemap<extent_map> &partial_extents,
+    const map<hobject_t,extent_map> &partial_extents,
     vector<pg_log_entry_t> &entries,
-    hobject_t::bitwisemap<extent_map> *written,
+    map<hobject_t,extent_map> *written,
     map<shard_id_t, ObjectStore::Transaction> *transactions,
-    set<hobject_t, hobject_t::BitwiseComparator> *temp_added,
-    set<hobject_t, hobject_t::BitwiseComparator> *temp_removed,
+    set<hobject_t> *temp_added,
+    set<hobject_t> *temp_removed,
     DoutPrefixProvider *dpp);
 };
 
index 5ac536a7e4dd1358c576880933c5628e38ed8558..43e9be44ac55688436890a1c1fc70fe2ce0b9a74 100644 (file)
@@ -5905,9 +5905,9 @@ void OSD::do_command(Connection *con, ceph_tid_t tid, vector<string>& cmd, buffe
       pg->lock();
 
       fout << *pg << std::endl;
-      std::map<hobject_t, pg_missing_item, hobject_t::BitwiseComparator>::const_iterator mend =
+      std::map<hobject_t, pg_missing_item>::const_iterator mend =
        pg->pg_log.get_missing().get_items().end();
-      std::map<hobject_t, pg_missing_item, hobject_t::BitwiseComparator>::const_iterator mi =
+      std::map<hobject_t, pg_missing_item>::const_iterator mi =
        pg->pg_log.get_missing().get_items().begin();
       for (; mi != mend; ++mi) {
        fout << mi->first << " -> " << mi->second << std::endl;
index af5a847636bebbce65b620bea407ce9f907ed781..e2d35f01d32bebf5cd41adc4ba68a6ba718b6174 100644 (file)
@@ -727,7 +727,7 @@ private:
   bool agent_valid_iterator;
   int agent_ops;
   int flush_mode_high_count; //once have one pg with FLUSH_MODE_HIGH then flush objects with high speed
-  set<hobject_t, hobject_t::BitwiseComparator> agent_oids;
+  set<hobject_t> agent_oids;
   bool agent_active;
   struct AgentThread : public Thread {
     OSDService *osd;
@@ -934,7 +934,7 @@ private:
   uint64_t recovery_ops_reserved;
   bool recovery_paused;
 #ifdef DEBUG_RECOVERY_OIDS
-  map<spg_t, set<hobject_t, hobject_t::BitwiseComparator> > recovery_oids;
+  map<spg_t, set<hobject_t> > recovery_oids;
 #endif
   bool _recover_now(uint64_t *available_pushes);
   void _maybe_queue_recovery();
index 0b1b62528a97fffcf95f9ce8129c01eba0fd6b89..13e063472ca0741ced441ad6eea2909aad3c998d 100644 (file)
@@ -354,7 +354,7 @@ void PG::proc_replica_log(
   dout(10) << " peer osd." << from << " now " << oinfo << " " << omissing << dendl;
   might_have_unfound.insert(from);
 
-  for (map<hobject_t, pg_missing_item, hobject_t::ComparatorWithDefault>::const_iterator i =
+  for (map<hobject_t, pg_missing_item>::const_iterator i =
         omissing.get_items().begin();
        i != omissing.get_items().end();
        ++i) {
@@ -520,7 +520,7 @@ void PG::MissingLoc::add_batch_sources_info(
   ldout(pg->cct, 10) << __func__ << ": adding sources in batch "
                     << sources.size() << dendl;
   unsigned loop = 0;
-  for (map<hobject_t, pg_missing_item, hobject_t::ComparatorWithDefault>::const_iterator i = needs_recovery_map.begin();
+  for (map<hobject_t, pg_missing_item>::const_iterator i = needs_recovery_map.begin();
       i != needs_recovery_map.end();
       ++i) {
     if (handle && ++loop >= pg->cct->_conf->osd_loop_before_reset_tphandle) {
@@ -542,7 +542,7 @@ bool PG::MissingLoc::add_source_info(
   bool found_missing = false;
   unsigned loop = 0;
   // found items?
-  for (map<hobject_t,pg_missing_item, hobject_t::ComparatorWithDefault>::const_iterator p = needs_recovery_map.begin();
+  for (map<hobject_t,pg_missing_item>::const_iterator p = needs_recovery_map.begin();
        p != needs_recovery_map.end();
        ++p) {
     const hobject_t &soid(p->first);
@@ -2487,7 +2487,7 @@ void PG::split_backoffs(PG *child, unsigned split_bits)
 void PG::clear_backoffs()
 {
   dout(10) << __func__ << " " << dendl;
-  map<hobject_t,set<BackoffRef>,hobject_t::BitwiseComparator> ls;
+  map<hobject_t,set<BackoffRef>> ls;
   {
     Mutex::Locker l(backoff_lock);
     ls.swap(backoffs);
@@ -3517,9 +3517,9 @@ void PG::filter_snapc(vector<snapid_t> &snaps)
   }
 }
 
-void PG::requeue_object_waiters(map<hobject_t, list<OpRequestRef>, hobject_t::BitwiseComparator>& m)
+void PG::requeue_object_waiters(map<hobject_t, list<OpRequestRef>>& m)
 {
-  for (map<hobject_t, list<OpRequestRef>, hobject_t::BitwiseComparator>::iterator it = m.begin();
+  for (map<hobject_t, list<OpRequestRef>>::iterator it = m.begin();
        it != m.end();
        ++it)
     requeue_ops(it->second);
@@ -3938,7 +3938,7 @@ void PG::_scan_rollback_obs(
 
 void PG::_scan_snaps(ScrubMap &smap) 
 {
-  for (map<hobject_t, ScrubMap::object, hobject_t::BitwiseComparator>::iterator i = smap.objects.begin();
+  for (map<hobject_t, ScrubMap::object>::iterator i = smap.objects.begin();
        i != smap.objects.end();
        ++i) {
     const hobject_t &hoid = i->first;
@@ -4598,7 +4598,7 @@ void PG::scrub_compare_maps()
 
   // construct authoritative scrub map for type specific scrubbing
   scrubber.cleaned_meta_map.insert(scrubber.primary_scrubmap);
-  map<hobject_t, pair<uint32_t, uint32_t>, hobject_t::BitwiseComparator> missing_digest;
+  map<hobject_t, pair<uint32_t, uint32_t>> missing_digest;
 
   if (acting.size() > 1) {
     dout(10) << __func__ << "  comparing replica scrub maps" << dendl;
@@ -4606,7 +4606,7 @@ void PG::scrub_compare_maps()
     stringstream ss;
 
     // Map from object with errors to good peer
-    map<hobject_t, list<pg_shard_t>, hobject_t::BitwiseComparator> authoritative;
+    map<hobject_t, list<pg_shard_t>> authoritative;
     map<pg_shard_t, ScrubMap *> maps;
 
     dout(2) << __func__ << "   osd." << acting[0] << " has "
@@ -4641,7 +4641,7 @@ void PG::scrub_compare_maps()
       osd->clog->error(ss);
     }
 
-    for (map<hobject_t, list<pg_shard_t>, hobject_t::BitwiseComparator>::iterator i = authoritative.begin();
+    for (map<hobject_t, list<pg_shard_t>>::iterator i = authoritative.begin();
         i != authoritative.end();
         ++i) {
       list<pair<ScrubMap::object, pg_shard_t> > good_peers;
@@ -4656,7 +4656,7 @@ void PG::scrub_compare_maps()
          good_peers));
     }
 
-    for (map<hobject_t, list<pg_shard_t>, hobject_t::BitwiseComparator>::iterator i = authoritative.begin();
+    for (map<hobject_t, list<pg_shard_t>>::iterator i = authoritative.begin();
         i != authoritative.end();
         ++i) {
       scrubber.cleaned_meta_map.objects.erase(i->first);
@@ -4717,7 +4717,7 @@ bool PG::scrub_process_inconsistent()
     osd->clog->error(ss);
     if (repair) {
       state_clear(PG_STATE_CLEAN);
-      for (map<hobject_t, list<pair<ScrubMap::object, pg_shard_t> >, hobject_t::BitwiseComparator>::iterator i =
+      for (map<hobject_t, list<pair<ScrubMap::object, pg_shard_t> >>::iterator i =
             scrubber.authoritative.begin();
           i != scrubber.authoritative.end();
           ++i) {
index 0daf3b8b74d1a3d9c5ec1ad253923983cf9290dd..019a9b66000c075a31bb96025a2049da5140c1cd 100644 (file)
@@ -329,8 +329,8 @@ public:
   ghobject_t    pgmeta_oid;
 
   class MissingLoc {
-    map<hobject_t, pg_missing_item, hobject_t::BitwiseComparator> needs_recovery_map;
-    map<hobject_t, set<pg_shard_t>, hobject_t::BitwiseComparator > missing_loc;
+    map<hobject_t, pg_missing_item> needs_recovery_map;
+    map<hobject_t, set<pg_shard_t> > missing_loc;
     set<pg_shard_t> missing_loc_sources;
     PG *pg;
     set<pg_shard_t> empty_set;
@@ -349,7 +349,7 @@ public:
     bool needs_recovery(
       const hobject_t &hoid,
       eversion_t *v = 0) const {
-      map<hobject_t, pg_missing_item, hobject_t::BitwiseComparator>::const_iterator i =
+      map<hobject_t, pg_missing_item>::const_iterator i =
        needs_recovery_map.find(hoid);
       if (i == needs_recovery_map.end())
        return false;
@@ -367,7 +367,7 @@ public:
       const set<pg_shard_t> &acting) const;
     uint64_t num_unfound() const {
       uint64_t ret = 0;
-      for (map<hobject_t, pg_missing_item, hobject_t::BitwiseComparator>::const_iterator i =
+      for (map<hobject_t, pg_missing_item>::const_iterator i =
             needs_recovery_map.begin();
           i != needs_recovery_map.end();
           ++i) {
@@ -378,7 +378,7 @@ public:
     }
 
     bool have_unfound() const {
-      for (map<hobject_t, pg_missing_item, hobject_t::BitwiseComparator>::const_iterator i =
+      for (map<hobject_t, pg_missing_item>::const_iterator i =
             needs_recovery_map.begin();
           i != needs_recovery_map.end();
           ++i) {
@@ -400,11 +400,11 @@ public:
       missing_loc[hoid].erase(location);
     }
     void add_active_missing(const pg_missing_t &missing) {
-      for (map<hobject_t, pg_missing_item, hobject_t::BitwiseComparator>::const_iterator i =
+      for (map<hobject_t, pg_missing_item>::const_iterator i =
             missing.get_items().begin();
           i != missing.get_items().end();
           ++i) {
-       map<hobject_t, pg_missing_item, hobject_t::BitwiseComparator>::const_iterator j =
+       map<hobject_t, pg_missing_item>::const_iterator j =
          needs_recovery_map.find(i->first);
        if (j == needs_recovery_map.end()) {
          needs_recovery_map.insert(*i);
@@ -498,10 +498,10 @@ public:
       return missing_loc.count(hoid) ?
        missing_loc.find(hoid)->second : empty_set;
     }
-    const map<hobject_t, set<pg_shard_t>, hobject_t::BitwiseComparator> &get_missing_locs() const {
+    const map<hobject_t, set<pg_shard_t>> &get_missing_locs() const {
       return missing_loc;
     }
-    const map<hobject_t, pg_missing_item, hobject_t::BitwiseComparator> &get_needs_recovery() const {
+    const map<hobject_t, pg_missing_item> &get_needs_recovery() const {
       return needs_recovery_map;
     }
   } missing_loc;
@@ -519,7 +519,7 @@ public:
   int recovery_ops_active;
   set<pg_shard_t> waiting_on_backfill;
 #ifdef DEBUG_RECOVERY_OIDS
-  set<hobject_t, hobject_t::BitwiseComparator> recovering_oids;
+  set<hobject_t> recovering_oids;
 #endif
 
 protected:
@@ -726,14 +726,13 @@ public:
   struct BackfillInterval {
     // info about a backfill interval on a peer
     eversion_t version; /// version at which the scan occurred
-    map<hobject_t,eversion_t,hobject_t::Comparator> objects;
+    map<hobject_t,eversion_t> objects;
     bool sort_bitwise;
     hobject_t begin;
     hobject_t end;
 
     explicit BackfillInterval(bool bitwise=true)
-      : objects(hobject_t::Comparator(bitwise)),
-       sort_bitwise(bitwise)
+      : sort_bitwise(bitwise)
     {}
     
     /// clear content
@@ -743,9 +742,7 @@ public:
 
     /// clear objects list only
     void clear_objects() {
-      // make sure we preserve the allocator and ordering!
-      objects = map<hobject_t,eversion_t,hobject_t::Comparator>(
-        hobject_t::Comparator(sort_bitwise));
+      objects.clear();
     }
 
     /// reinstantiate with a new start+end position and sort order
@@ -793,7 +790,7 @@ public:
       f->dump_stream("begin") << begin;
       f->dump_stream("end") << end;
       f->open_array_section("objects");
-      for (map<hobject_t, eversion_t, hobject_t::Comparator>::const_iterator i =
+      for (map<hobject_t, eversion_t>::const_iterator i =
             objects.begin();
           i != objects.end();
           ++i) {
@@ -836,31 +833,23 @@ protected:
 
   list<OpRequestRef>            waiting_for_cache_not_full;
   list<OpRequestRef>            waiting_for_all_missing;
-  map<hobject_t, list<OpRequestRef>, hobject_t::BitwiseComparator> waiting_for_unreadable_object,
+  map<hobject_t, list<OpRequestRef>> waiting_for_unreadable_object,
                             waiting_for_degraded_object,
                             waiting_for_blocked_object;
 
-  set<
-    hobject_t,
-    hobject_t::BitwiseComparator> objects_blocked_on_cache_full;
-  map<
-    hobject_t,
-    snapid_t,
-    hobject_t::BitwiseComparator> objects_blocked_on_degraded_snap;
-  map<
-    hobject_t,
-    ObjectContextRef,
-    hobject_t::BitwiseComparator> objects_blocked_on_snap_promotion;
+  set<hobject_t> objects_blocked_on_cache_full;
+  map<hobject_t,snapid_t> objects_blocked_on_degraded_snap;
+  map<hobject_t,ObjectContextRef> objects_blocked_on_snap_promotion;
 
   // Callbacks should assume pg (and nothing else) is locked
-  map<hobject_t, list<Context*>, hobject_t::BitwiseComparator> callbacks_for_degraded_object;
+  map<hobject_t, list<Context*>> callbacks_for_degraded_object;
 
   map<eversion_t,
       list<pair<OpRequestRef, version_t> > > waiting_for_ondisk;
 
   void split_ops(PG *child, unsigned split_bits);
 
-  void requeue_object_waiters(map<hobject_t, list<OpRequestRef>, hobject_t::BitwiseComparator>& m);
+  void requeue_object_waiters(map<hobject_t, list<OpRequestRef>>& m);
   void requeue_op(OpRequestRef op);
   void requeue_ops(list<OpRequestRef> &l);
 
@@ -1086,7 +1075,7 @@ public:
 
   // -- backoff --
   Mutex backoff_lock;  // orders inside Backoff::lock
-  map<hobject_t,set<BackoffRef>,hobject_t::BitwiseComparator> backoffs;
+  map<hobject_t,set<BackoffRef>> backoffs;
 
   void add_backoff(SessionRef s, const hobject_t& begin, const hobject_t& end);
   void release_backoffs(const hobject_t& begin, const hobject_t& end);
@@ -1139,11 +1128,11 @@ public:
     bool auto_repair;
 
     // Maps from objects with errors to missing/inconsistent peers
-    map<hobject_t, set<pg_shard_t>, hobject_t::BitwiseComparator> missing;
-    map<hobject_t, set<pg_shard_t>, hobject_t::BitwiseComparator> inconsistent;
+    map<hobject_t, set<pg_shard_t>> missing;
+    map<hobject_t, set<pg_shard_t>> inconsistent;
 
     // Map from object with errors to good peers
-    map<hobject_t, list<pair<ScrubMap::object, pg_shard_t> >, hobject_t::BitwiseComparator> authoritative;
+    map<hobject_t, list<pair<ScrubMap::object, pg_shard_t> >> authoritative;
 
     // Cleaned map pending snap metadata scrub
     ScrubMap cleaned_meta_map;
@@ -1290,7 +1279,7 @@ public:
     const hobject_t &begin, const hobject_t &end) = 0;
   virtual void scrub_snapshot_metadata(
     ScrubMap &map,
-    const std::map<hobject_t, pair<uint32_t, uint32_t>, hobject_t::BitwiseComparator> &missing_digest) { }
+    const std::map<hobject_t, pair<uint32_t, uint32_t>> &missing_digest) { }
   virtual void _scrub_clear_state() { }
   virtual void _scrub_finish() { }
   virtual void split_colls(
index 805fd520ca3b2a778f0d1c39e177fbbfc0f01e20..03adc47095bccdef5597881a0bf415730e49a927 100644 (file)
@@ -174,7 +174,7 @@ void PGBackend::on_change_cleanup(ObjectStore::Transaction *t)
 {
   dout(10) << __func__ << dendl;
   // clear temp
-  for (set<hobject_t, hobject_t::BitwiseComparator>::iterator i = temp_contents.begin();
+  for (set<hobject_t>::iterator i = temp_contents.begin();
        i != temp_contents.end();
        ++i) {
     dout(10) << __func__ << ": Removing oid "
@@ -624,7 +624,7 @@ map<pg_shard_t, ScrubMap *>::const_iterator
   for (map<pg_shard_t, ScrubMap *>::const_iterator j = maps.begin();
        j != maps.end();
        ++j) {
-    map<hobject_t, ScrubMap::object, hobject_t::BitwiseComparator>::iterator i =
+    map<hobject_t, ScrubMap::object>::iterator i =
       j->second->objects.find(obj);
     if (i == j->second->objects.end()) {
       continue;
@@ -715,19 +715,19 @@ out:
 void PGBackend::be_compare_scrubmaps(
   const map<pg_shard_t,ScrubMap*> &maps,
   bool repair,
-  map<hobject_t, set<pg_shard_t>, hobject_t::BitwiseComparator> &missing,
-  map<hobject_t, set<pg_shard_t>, hobject_t::BitwiseComparator> &inconsistent,
-  map<hobject_t, list<pg_shard_t>, hobject_t::BitwiseComparator> &authoritative,
-  map<hobject_t, pair<uint32_t,uint32_t>, hobject_t::BitwiseComparator> &missing_digest,
+  map<hobject_t, set<pg_shard_t>> &missing,
+  map<hobject_t, set<pg_shard_t>> &inconsistent,
+  map<hobject_t, list<pg_shard_t>> &authoritative,
+  map<hobject_t, pair<uint32_t,uint32_t>> &missing_digest,
   int &shallow_errors, int &deep_errors,
   Scrub::Store *store,
   const spg_t& pgid,
   const vector<int> &acting,
   ostream &errorstream)
 {
-  map<hobject_t,ScrubMap::object, hobject_t::BitwiseComparator>::const_iterator i;
-  map<pg_shard_t, ScrubMap *, hobject_t::BitwiseComparator>::const_iterator j;
-  set<hobject_t, hobject_t::BitwiseComparator> master_set;
+  map<hobject_t,ScrubMap::object>::const_iterator i;
+  map<pg_shard_t, ScrubMap *>::const_iterator j;
+  set<hobject_t> master_set;
   utime_t now = ceph_clock_now();
 
   // Construct master set
@@ -738,7 +738,7 @@ void PGBackend::be_compare_scrubmaps(
   }
 
   // Check maps against master set and each other
-  for (set<hobject_t, hobject_t::BitwiseComparator>::const_iterator k = master_set.begin();
+  for (set<hobject_t>::const_iterator k = master_set.begin();
        k != master_set.end();
        ++k) {
     object_info_t auth_oi;
index b932ad31595e8c7c1ddba897783328e1f2be0602..e6991ed3975bd783fcc110890d8ca6d1b0dc353c 100644 (file)
@@ -140,7 +140,7 @@ typedef ceph::shared_ptr<const OSDMap> OSDMapRef;
 
      virtual std::string gen_dbg_prefix() const = 0;
 
-     virtual const map<hobject_t, set<pg_shard_t>, hobject_t::BitwiseComparator> &get_missing_loc_shards()
+     virtual const map<hobject_t, set<pg_shard_t>> &get_missing_loc_shards()
        const = 0;
 
      virtual const pg_missing_tracker_t &get_local_missing() const = 0;
@@ -369,20 +369,20 @@ typedef ceph::shared_ptr<const OSDMap> OSDMapRef;
    virtual void dump_recovery_info(Formatter *f) const = 0;
 
  private:
-   set<hobject_t, hobject_t::BitwiseComparator> temp_contents;
+   set<hobject_t> temp_contents;
  public:
    // Track contents of temp collection, clear on reset
    void add_temp_obj(const hobject_t &oid) {
      temp_contents.insert(oid);
    }
-   void add_temp_objs(const set<hobject_t, hobject_t::BitwiseComparator> &oids) {
+   void add_temp_objs(const set<hobject_t> &oids) {
      temp_contents.insert(oids.begin(), oids.end());
    }
    void clear_temp_obj(const hobject_t &oid) {
      temp_contents.erase(oid);
    }
-   void clear_temp_objs(const set<hobject_t, hobject_t::BitwiseComparator> &oids) {
-     for (set<hobject_t, hobject_t::BitwiseComparator>::const_iterator i = oids.begin();
+   void clear_temp_objs(const set<hobject_t> &oids) {
+     for (set<hobject_t>::const_iterator i = oids.begin();
          i != oids.end();
          ++i) {
        temp_contents.erase(*i);
@@ -540,10 +540,10 @@ typedef ceph::shared_ptr<const OSDMap> OSDMapRef;
    void be_compare_scrubmaps(
      const map<pg_shard_t,ScrubMap*> &maps,
      bool repair,
-     map<hobject_t, set<pg_shard_t>, hobject_t::BitwiseComparator> &missing,
-     map<hobject_t, set<pg_shard_t>, hobject_t::BitwiseComparator> &inconsistent,
-     map<hobject_t, list<pg_shard_t>, hobject_t::BitwiseComparator> &authoritative,
-     map<hobject_t, pair<uint32_t,uint32_t>, hobject_t::BitwiseComparator> &missing_digest,
+     map<hobject_t, set<pg_shard_t>> &missing,
+     map<hobject_t, set<pg_shard_t>> &inconsistent,
+     map<hobject_t, list<pg_shard_t>> &authoritative,
+     map<hobject_t, pair<uint32_t,uint32_t>> &missing_digest,
      int &shallow_errors, int &deep_errors,
      Scrub::Store *store,
      const spg_t& pgid,
index 99ca4ef054a56302d7213a063a869292450888b2..cba1a5244593cfe6fae401a939dcf51afd4e2252 100644 (file)
@@ -157,7 +157,7 @@ void PGLog::proc_replica_log(
     we will send the peer enough log to arrive at the same state.
   */
 
-  for (map<hobject_t, pg_missing_item, hobject_t::BitwiseComparator>::const_iterator i = omissing.get_items().begin();
+  for (map<hobject_t, pg_missing_item>::const_iterator i = omissing.get_items().begin();
        i != omissing.get_items().end();
        ++i) {
     dout(20) << " before missing " << i->first << " need " << i->second.need
@@ -285,7 +285,7 @@ void PGLog::merge_log(ObjectStore::Transaction& t,
   // The logs must overlap.
   assert(log.head >= olog.tail && olog.head >= log.tail);
 
-  for (map<hobject_t, pg_missing_item, hobject_t::BitwiseComparator>::const_iterator i = missing.get_items().begin();
+  for (map<hobject_t, pg_missing_item>::const_iterator i = missing.get_items().begin();
        i != missing.get_items().end();
        ++i) {
     dout(20) << "pg_missing_t sobject: " << i->first << dendl;
index 022f0c156c23843da478ddc0476c9bc856e53abb..2d44c648106430e25289ed23aa6584470250e633 100644 (file)
@@ -573,10 +573,6 @@ public:
   //////////////////// get or set missing ////////////////////
 
   const pg_missing_tracker_t& get_missing() const { return missing; }
-  void resort_missing(bool sort_bitwise) {
-    missing.resort(sort_bitwise);
-  }
-
   void revise_have(hobject_t oid, eversion_t have) {
     missing.revise_have(oid, have);
   }
@@ -712,7 +708,7 @@ public:
 protected:
   static void split_by_object(
     mempool::osd::list<pg_log_entry_t> &entries,
-    map<hobject_t, mempool::osd::list<pg_log_entry_t>, hobject_t::BitwiseComparator> *out_entries) {
+    map<hobject_t, mempool::osd::list<pg_log_entry_t>> *out_entries) {
     while (!entries.empty()) {
       mempool::osd::list<pg_log_entry_t> &out_list = (*out_entries)[entries.front().soid];
       out_list.splice(out_list.end(), entries, entries.begin());
@@ -932,9 +928,9 @@ protected:
     LogEntryHandler *rollbacker,         ///< [in] optional rollbacker object
     const DoutPrefixProvider *dpp        ///< [in] logging provider
     ) {
-    map<hobject_t, mempool::osd::list<pg_log_entry_t>, hobject_t::BitwiseComparator > split;
+    map<hobject_t, mempool::osd::list<pg_log_entry_t> > split;
     split_by_object(entries, &split);
-    for (map<hobject_t, mempool::osd::list<pg_log_entry_t>, hobject_t::BitwiseComparator>::iterator i = split.begin();
+    for (map<hobject_t, mempool::osd::list<pg_log_entry_t>>::iterator i = split.begin();
         i != split.end();
         ++i) {
       _merge_object_divergent_entries(
@@ -1185,9 +1181,9 @@ public:
                           << info.last_complete
                           << "," << info.last_update << "]" << dendl;
 
-       set<hobject_t, hobject_t::BitwiseComparator> did;
-       set<hobject_t, hobject_t::BitwiseComparator> checked;
-       set<hobject_t, hobject_t::BitwiseComparator> skipped;
+       set<hobject_t> did;
+       set<hobject_t> checked;
+       set<hobject_t> skipped;
        for (list<pg_log_entry_t>::reverse_iterator i = log.log.rbegin();
             i != log.log.rend();
             ++i) {
index 5b8f721c8a58e43e423eee12676915ac97bee01b..2e1013bca86a21d95ceea37297933057f900186f 100644 (file)
@@ -36,7 +36,7 @@
  */
 class PGTransaction {
 public:
-  map<hobject_t, ObjectContextRef, hobject_t::BitwiseComparator> obc_map;
+  map<hobject_t, ObjectContextRef> obc_map;
 
   class ObjectOperation {
   public:
@@ -245,7 +245,7 @@ public:
 
     friend class PGTransaction;
   };
-  map<hobject_t, ObjectOperation, hobject_t::BitwiseComparator> op_map;
+  map<hobject_t, ObjectOperation> op_map;
 private:
   ObjectOperation &get_object_op_for_modify(const hobject_t &hoid) {
     auto &op = op_map[hoid];
@@ -523,7 +523,7 @@ public:
    */
   template <typename T>
   void safe_create_traverse(T &&t) {
-    map<hobject_t, list<hobject_t>, hobject_t::BitwiseComparator> dgraph;
+    map<hobject_t, list<hobject_t>> dgraph;
     list<hobject_t> stack;
 
     // Populate stack with roots, dgraph with edges
index 2bc34cf9bc3eef3021016480aef2a6830579b386..f703664f36b1011b77bee4e9fed15d8d358923ec 100644 (file)
@@ -437,7 +437,7 @@ void PrimaryLogPG::on_global_recover(
   missing_loc.recovered(soid);
   publish_stats_to_osd();
   dout(10) << "pushed " << soid << " to all replicas" << dendl;
-  map<hobject_t, ObjectContextRef, hobject_t::BitwiseComparator>::iterator i = recovering.find(soid);
+  map<hobject_t, ObjectContextRef>::iterator i = recovering.find(soid);
   assert(i != recovering.end());
 
   // recover missing won't have had an obc, but it gets filled in
@@ -537,7 +537,7 @@ void PrimaryLogPG::maybe_kick_recovery(
   if (!missing_loc.needs_recovery(soid, &v))
     return;
 
-  map<hobject_t, ObjectContextRef, hobject_t::BitwiseComparator>::const_iterator p = recovering.find(soid);
+  map<hobject_t, ObjectContextRef>::const_iterator p = recovering.find(soid);
   if (p != recovering.end()) {
     dout(7) << "object " << soid << " v " << v << ", already recovering." << dendl;
   } else if (missing_loc.is_unfound(soid)) {
@@ -979,9 +979,9 @@ int PrimaryLogPG::do_command(
     }
     f->dump_int("num_missing", missing.num_missing());
     f->dump_int("num_unfound", get_num_unfound());
-    const map<hobject_t, pg_missing_item, hobject_t::BitwiseComparator> &needs_recovery_map =
+    const map<hobject_t, pg_missing_item> &needs_recovery_map =
       missing_loc.get_needs_recovery();
-    map<hobject_t, pg_missing_item, hobject_t::BitwiseComparator>::const_iterator p =
+    map<hobject_t, pg_missing_item>::const_iterator p =
       needs_recovery_map.upper_bound(offset);
     {
       f->open_array_section("objects");
@@ -1133,10 +1133,7 @@ void PrimaryLogPG::do_pg_op(OpRequestRef op)
 
        assert(snapid == CEPH_NOSNAP || pg_log.get_missing().get_items().empty());
 
-       // ensure sort order is correct
-       pg_log.resort_missing(get_sort_bitwise());
-
-       map<hobject_t, pg_missing_item, hobject_t::ComparatorWithDefault>::const_iterator missing_iter =
+       map<hobject_t, pg_missing_item>::const_iterator missing_iter =
          pg_log.get_missing().get_items().lower_bound(current);
        vector<hobject_t>::iterator ls_iter = sentries.begin();
        hobject_t _max = hobject_t::get_max();
@@ -1320,10 +1317,7 @@ void PrimaryLogPG::do_pg_op(OpRequestRef op)
 
        assert(snapid == CEPH_NOSNAP || pg_log.get_missing().get_items().empty());
 
-       // ensure sort order is correct
-       pg_log.resort_missing(get_sort_bitwise());
-
-       map<hobject_t, pg_missing_item, hobject_t::ComparatorWithDefault>::const_iterator missing_iter =
+       map<hobject_t, pg_missing_item>::const_iterator missing_iter =
          pg_log.get_missing().get_items().lower_bound(current);
        vector<hobject_t>::iterator ls_iter = sentries.begin();
        hobject_t _max = hobject_t::get_max();
@@ -1579,8 +1573,6 @@ PrimaryLogPG::PrimaryLogPG(OSDService *o, OSDMapRef curmap,
       _pool.info, curmap, this, coll_t(p), ch, o->store, cct)),
   object_contexts(o->cct, o->cct->_conf->osd_pg_object_context_cache_count),
   snapset_contexts_lock("PrimaryLogPG::snapset_contexts_lock"),
-  backfills_in_flight(hobject_t::Comparator(true)),
-  pending_backfill_updates(hobject_t::Comparator(true)),
   new_backfill(false),
   temp_seq(0),
   snap_trimmer_machine(this)
@@ -2205,7 +2197,7 @@ void PrimaryLogPG::do_op(OpRequestRef& op)
 
     // verify there is in fact a flush in progress
     // FIXME: we could make this a stronger test.
-    map<hobject_t,FlushOpRef, hobject_t::BitwiseComparator>::iterator p = flush_ops.find(obc->obs.oi.soid);
+    map<hobject_t,FlushOpRef>::iterator p = flush_ops.find(obc->obs.oi.soid);
     if (p == flush_ops.end()) {
       dout(10) << __func__ << " no flush in progress, aborting" << dendl;
       reply_ctx(ctx, -EINVAL);
@@ -2719,7 +2711,7 @@ void PrimaryLogPG::finish_proxy_read(hobject_t oid, ceph_tid_t tid, int r)
   }
   proxyread_ops.erase(tid);
 
-  map<hobject_t, list<OpRequestRef>, hobject_t::BitwiseComparator>::iterator q = in_progress_proxy_ops.find(oid);
+  map<hobject_t, list<OpRequestRef>>::iterator q = in_progress_proxy_ops.find(oid);
   if (q == in_progress_proxy_ops.end()) {
     dout(10) << __func__ << " no in_progress_proxy_ops found" << dendl;
     return;
@@ -2748,7 +2740,7 @@ void PrimaryLogPG::finish_proxy_read(hobject_t oid, ceph_tid_t tid, int r)
 
 void PrimaryLogPG::kick_proxy_ops_blocked(hobject_t& soid)
 {
-  map<hobject_t, list<OpRequestRef>, hobject_t::BitwiseComparator>::iterator p = in_progress_proxy_ops.find(soid);
+  map<hobject_t, list<OpRequestRef>>::iterator p = in_progress_proxy_ops.find(soid);
   if (p == in_progress_proxy_ops.end())
     return;
 
@@ -2791,7 +2783,7 @@ void PrimaryLogPG::cancel_proxy_ops(bool requeue)
   }
 
   if (requeue) {
-    map<hobject_t, list<OpRequestRef>, hobject_t::BitwiseComparator>::iterator p =
+    map<hobject_t, list<OpRequestRef>>::iterator p =
       in_progress_proxy_ops.begin();
     while (p != in_progress_proxy_ops.end()) {
       list<OpRequestRef>& ls = p->second;
@@ -3006,7 +2998,7 @@ void PrimaryLogPG::promote_object(ObjectContextRef obc,
    * for this case we don't use DONTNEED.
    */
   unsigned src_fadvise_flags = LIBRADOS_OP_FLAG_FADVISE_SEQUENTIAL;
-  map<hobject_t, list<OpRequestRef>, hobject_t::BitwiseComparator>::iterator q = in_progress_proxy_ops.find(obc->obs.oi.soid);
+  map<hobject_t, list<OpRequestRef>>::iterator q = in_progress_proxy_ops.find(obc->obs.oi.soid);
   if (q == in_progress_proxy_ops.end()) {
     src_fadvise_flags |= LIBRADOS_OP_FLAG_FADVISE_DONTNEED;
   }
@@ -7289,7 +7281,7 @@ void PrimaryLogPG::process_copy_chunk(hobject_t oid, ceph_tid_t tid, int r)
 {
   dout(10) << __func__ << " " << oid << " tid " << tid
           << " " << cpp_strerror(r) << dendl;
-  map<hobject_t,CopyOpRef, hobject_t::BitwiseComparator>::iterator p = copy_ops.find(oid);
+  map<hobject_t,CopyOpRef>::iterator p = copy_ops.find(oid);
   if (p == copy_ops.end()) {
     dout(10) << __func__ << " no copy_op found" << dendl;
     return;
@@ -7717,7 +7709,7 @@ void PrimaryLogPG::finish_promote(int r, CopyResults *results,
     // pass error to everyone blocked on this object
     // FIXME: this is pretty sloppy, but at this point we got
     // something unexpected and don't have many other options.
-    map<hobject_t,list<OpRequestRef>, hobject_t::BitwiseComparator>::iterator blocked_iter =
+    map<hobject_t,list<OpRequestRef>>::iterator blocked_iter =
       waiting_for_blocked_object.find(soid);
     if (blocked_iter != waiting_for_blocked_object.end()) {
       while (!blocked_iter->second.empty()) {
@@ -7842,7 +7834,7 @@ void PrimaryLogPG::cancel_copy(CopyOpRef cop, bool requeue)
 void PrimaryLogPG::cancel_copy_ops(bool requeue)
 {
   dout(10) << __func__ << dendl;
-  map<hobject_t,CopyOpRef, hobject_t::BitwiseComparator>::iterator p = copy_ops.begin();
+  map<hobject_t,CopyOpRef>::iterator p = copy_ops.begin();
   while (p != copy_ops.end()) {
     // requeue this op? can I queue up all of them?
     cancel_copy((p++)->second, requeue);
@@ -7954,7 +7946,7 @@ int PrimaryLogPG::start_flush(
   if (blocking)
     obc->start_block();
 
-  map<hobject_t,FlushOpRef, hobject_t::BitwiseComparator>::iterator p = flush_ops.find(soid);
+  map<hobject_t,FlushOpRef>::iterator p = flush_ops.find(soid);
   if (p != flush_ops.end()) {
     FlushOpRef fop = p->second;
     if (fop->op == op) {
@@ -8106,7 +8098,7 @@ void PrimaryLogPG::finish_flush(hobject_t oid, ceph_tid_t tid, int r)
 {
   dout(10) << __func__ << " " << oid << " tid " << tid
           << " " << cpp_strerror(r) << dendl;
-  map<hobject_t,FlushOpRef, hobject_t::BitwiseComparator>::iterator p = flush_ops.find(oid);
+  map<hobject_t,FlushOpRef>::iterator p = flush_ops.find(oid);
   if (p == flush_ops.end()) {
     dout(10) << __func__ << " no flush_op found" << dendl;
     return;
@@ -8296,7 +8288,7 @@ void PrimaryLogPG::cancel_flush(FlushOpRef fop, bool requeue)
 void PrimaryLogPG::cancel_flush_ops(bool requeue)
 {
   dout(10) << __func__ << dendl;
-  map<hobject_t,FlushOpRef, hobject_t::BitwiseComparator>::iterator p = flush_ops.begin();
+  map<hobject_t,FlushOpRef>::iterator p = flush_ops.begin();
   while (p != flush_ops.end()) {
     cancel_flush((p++)->second, requeue);
   }
@@ -9355,7 +9347,7 @@ void PrimaryLogPG::kick_object_context_blocked(ObjectContextRef obc)
     return;
   }
 
-  map<hobject_t, list<OpRequestRef>, hobject_t::BitwiseComparator>::iterator p = waiting_for_blocked_object.find(soid);
+  map<hobject_t, list<OpRequestRef>>::iterator p = waiting_for_blocked_object.find(soid);
   if (p != waiting_for_blocked_object.end()) {
     list<OpRequestRef>& ls = p->second;
     dout(10) << __func__ << " " << soid << " requeuing " << ls.size() << " requests" << dendl;
@@ -9384,7 +9376,7 @@ SnapSetContext *PrimaryLogPG::get_snapset_context(
 {
   Mutex::Locker l(snapset_contexts_lock);
   SnapSetContext *ssc;
-  map<hobject_t, SnapSetContext*, hobject_t::BitwiseComparator>::iterator p = snapset_contexts.find(
+  map<hobject_t, SnapSetContext*>::iterator p = snapset_contexts.find(
     oid.get_snapdir());
   if (p != snapset_contexts.end()) {
     if (can_create || p->second->exists) {
@@ -9803,9 +9795,9 @@ void PrimaryLogPG::mark_all_unfound_lost(
   mempool::osd::list<pg_log_entry_t> log_entries;
 
   utime_t mtime = ceph_clock_now();
-  map<hobject_t, pg_missing_item, hobject_t::ComparatorWithDefault>::const_iterator m =
+  map<hobject_t, pg_missing_item>::const_iterator m =
     missing_loc.get_needs_recovery().begin();
-  map<hobject_t, pg_missing_item, hobject_t::ComparatorWithDefault>::const_iterator mend =
+  map<hobject_t, pg_missing_item>::const_iterator mend =
     missing_loc.get_needs_recovery().end();
 
   ObcLockManager manager;
@@ -10094,12 +10086,6 @@ void PrimaryLogPG::on_activate()
 
 void PrimaryLogPG::_on_new_interval()
 {
-  // re-sort obc map?
-  if (object_contexts.get_comparator().bitwise != get_sort_bitwise()) {
-    dout(20) << __func__ << " resorting object_contexts" << dendl;
-    object_contexts.reset_comparator(
-      hobject_t::ComparatorWithDefault(get_sort_bitwise()));
-  }
 }
 
 void PrimaryLogPG::on_change(ObjectStore::Transaction *t)
@@ -10136,7 +10122,7 @@ void PrimaryLogPG::on_change(ObjectStore::Transaction *t)
   } else {
     waiting_for_unreadable_object.clear();
   }
-  for (map<hobject_t,list<OpRequestRef>, hobject_t::BitwiseComparator>::iterator p = waiting_for_degraded_object.begin();
+  for (map<hobject_t,list<OpRequestRef>>::iterator p = waiting_for_degraded_object.begin();
        p != waiting_for_degraded_object.end();
        waiting_for_degraded_object.erase(p++)) {
     release_backoffs(p->first);
@@ -10150,7 +10136,7 @@ void PrimaryLogPG::on_change(ObjectStore::Transaction *t)
   // requeues waiting_for_scrub
   scrub_clear_state();
 
-  for (map<hobject_t,list<OpRequestRef>, hobject_t::BitwiseComparator>::iterator p = waiting_for_blocked_object.begin();
+  for (auto p = waiting_for_blocked_object.begin();
        p != waiting_for_blocked_object.end();
        waiting_for_blocked_object.erase(p++)) {
     if (is_primary())
@@ -10158,8 +10144,7 @@ void PrimaryLogPG::on_change(ObjectStore::Transaction *t)
     else
       p->second.clear();
   }
-  for (map<hobject_t, list<Context*>, hobject_t::BitwiseComparator>::iterator i =
-        callbacks_for_degraded_object.begin();
+  for (auto i = callbacks_for_degraded_object.begin();
        i != callbacks_for_degraded_object.end();
     ) {
     finish_degraded_object((i++)->first);
@@ -10248,14 +10233,14 @@ void PrimaryLogPG::_clear_recovery_state()
   recovering_oids.clear();
 #endif
   last_backfill_started = hobject_t();
-  set<hobject_t, hobject_t::Comparator>::iterator i = backfills_in_flight.begin();
+  set<hobject_t>::iterator i = backfills_in_flight.begin();
   while (i != backfills_in_flight.end()) {
     assert(recovering.count(*i));
     backfills_in_flight.erase(i++);
   }
 
   list<OpRequestRef> blocked_ops;
-  for (map<hobject_t, ObjectContextRef, hobject_t::BitwiseComparator>::iterator i = recovering.begin();
+  for (map<hobject_t, ObjectContextRef>::iterator i = recovering.begin();
        i != recovering.end();
        recovering.erase(i++)) {
     if (i->second) {
@@ -10351,7 +10336,7 @@ void PG::MissingLoc::check_recovery_sources(const OSDMapRef& osdmap)
                       << missing_loc_sources << dendl;
     
     // filter missing_loc
-    map<hobject_t, set<pg_shard_t>, hobject_t::BitwiseComparator>::iterator p = missing_loc.begin();
+    map<hobject_t, set<pg_shard_t>>::iterator p = missing_loc.begin();
     while (p != missing_loc.end()) {
       set<pg_shard_t>::iterator q = p->second.begin();
       while (q != p->second.end())
@@ -10805,7 +10790,7 @@ uint64_t PrimaryLogPG::recover_replicas(uint64_t max, ThreadPool::TPHandle &hand
       }
 
       dout(10) << __func__ << ": recover_object_replicas(" << soid << ")" << dendl;
-      map<hobject_t,pg_missing_item, hobject_t::ComparatorWithDefault>::const_iterator r = m.get_items().find(soid);
+      map<hobject_t,pg_missing_item>::const_iterator r = m.get_items().find(soid);
       started += prep_object_replica_pushes(soid, r->second.need,
                                            h);
     }
@@ -10907,11 +10892,8 @@ uint64_t PrimaryLogPG::recover_backfill(
     backfill_info.reset(last_backfill_started,
                        get_sort_bitwise());
 
-    // initialize comparators
-    backfills_in_flight = set<hobject_t, hobject_t::Comparator>(
-      hobject_t::Comparator(get_sort_bitwise()));
-    pending_backfill_updates = map<hobject_t, pg_stat_t, hobject_t::Comparator>(
-      hobject_t::Comparator(get_sort_bitwise()));
+    backfills_in_flight.clear();
+    pending_backfill_updates.clear();
   }
 
   // sanity check sort orders
@@ -10921,10 +10903,7 @@ uint64_t PrimaryLogPG::recover_backfill(
        i != peer_backfill_info.end();
        ++i) {
     assert(i->second.sort_bitwise == get_sort_bitwise());
-    assert(i->second.objects.key_comp().bitwise == get_sort_bitwise());
   }
-  assert(backfills_in_flight.key_comp().bitwise == get_sort_bitwise());
-  assert(pending_backfill_updates.key_comp().bitwise == get_sort_bitwise());
 
   for (set<pg_shard_t>::iterator i = backfill_targets.begin();
        i != backfill_targets.end();
@@ -10945,7 +10924,7 @@ uint64_t PrimaryLogPG::recover_backfill(
   vector<boost::tuple<hobject_t, eversion_t,
                       ObjectContextRef, vector<pg_shard_t> > > to_push;
   vector<boost::tuple<hobject_t, eversion_t, pg_shard_t> > to_remove;
-  set<hobject_t, hobject_t::BitwiseComparator> add_to_stat;
+  set<hobject_t> add_to_stat;
 
   for (set<pg_shard_t>::iterator i = backfill_targets.begin();
        i != backfill_targets.end();
@@ -11170,7 +11149,7 @@ uint64_t PrimaryLogPG::recover_backfill(
   hobject_t backfill_pos =
     std::min(backfill_info.begin, earliest_peer_backfill());
 
-  for (set<hobject_t, hobject_t::BitwiseComparator>::iterator i = add_to_stat.begin();
+  for (set<hobject_t>::iterator i = add_to_stat.begin();
        i != add_to_stat.end();
        ++i) {
     ObjectContextRef obc = get_object_context(*i, false);
@@ -11198,7 +11177,7 @@ uint64_t PrimaryLogPG::recover_backfill(
   pgbackend->run_recovery_op(h, get_recovery_op_priority());
 
   dout(5) << "backfill_pos is " << backfill_pos << dendl;
-  for (set<hobject_t, hobject_t::Comparator>::iterator i = backfills_in_flight.begin();
+  for (set<hobject_t>::iterator i = backfills_in_flight.begin();
        i != backfills_in_flight.end();
        ++i) {
     dout(20) << *i << " is still in flight" << dendl;
@@ -11208,7 +11187,7 @@ uint64_t PrimaryLogPG::recover_backfill(
     backfill_pos : *(backfills_in_flight.begin());
   hobject_t new_last_backfill = earliest_backfill();
   dout(10) << "starting new_last_backfill at " << new_last_backfill << dendl;
-  for (map<hobject_t, pg_stat_t, hobject_t::Comparator>::iterator i =
+  for (map<hobject_t, pg_stat_t>::iterator i =
         pending_backfill_updates.begin();
        i != pending_backfill_updates.end() &&
         i->first < next_backfill_to_complete;
@@ -11442,7 +11421,7 @@ void PrimaryLogPG::check_local()
     return;
 
   // just scan the log.
-  set<hobject_t, hobject_t::BitwiseComparator> did;
+  set<hobject_t> did;
   for (list<pg_log_entry_t>::const_reverse_iterator p = pg_log.get_log().log.rbegin();
        p != pg_log.get_log().log.rend();
        ++p) {
@@ -12693,7 +12672,7 @@ unsigned PrimaryLogPG::process_clones_to(const boost::optional<hobject_t> &head,
  */
 void PrimaryLogPG::scrub_snapshot_metadata(
   ScrubMap &scrubmap,
-  const map<hobject_t, pair<uint32_t, uint32_t>, hobject_t::BitwiseComparator> &missing_digest)
+  const map<hobject_t, pair<uint32_t, uint32_t>> &missing_digest)
 {
   dout(10) << __func__ << dendl;
 
@@ -12712,7 +12691,7 @@ void PrimaryLogPG::scrub_snapshot_metadata(
 
   bufferlist last_data;
 
-  for (map<hobject_t,ScrubMap::object, hobject_t::BitwiseComparator>::reverse_iterator
+  for (map<hobject_t,ScrubMap::object>::reverse_iterator
        p = scrubmap.objects.rbegin(); p != scrubmap.objects.rend(); ++p) {
     const hobject_t& soid = p->first;
     soid_error = inconsistent_snapset_wrapper{soid};
@@ -12986,7 +12965,7 @@ void PrimaryLogPG::scrub_snapshot_metadata(
   if (head && head_error.errors)
     scrubber.store->add_snap_error(pool.id, head_error);
 
-  for (map<hobject_t,pair<uint32_t,uint32_t>, hobject_t::BitwiseComparator>::const_iterator p =
+  for (map<hobject_t,pair<uint32_t,uint32_t>>::const_iterator p =
         missing_digest.begin();
        p != missing_digest.end();
        ++p) {
index 6863a556df81dd58548c6e5b4b1494744cdae96a..3553b4d59f08d6fd95223800a337f9f158407082 100644 (file)
@@ -305,7 +305,7 @@ public:
 
   std::string gen_dbg_prefix() const override { return gen_prefix(); }
   
-  const map<hobject_t, set<pg_shard_t>, hobject_t::BitwiseComparator>
+  const map<hobject_t, set<pg_shard_t>>
     &get_missing_loc_shards() const override {
     return missing_loc.get_missing_locs();
   }
@@ -937,13 +937,13 @@ protected:
   bool already_ack(eversion_t v);
 
   // projected object info
-  SharedLRU<hobject_t, ObjectContext, hobject_t::ComparatorWithDefault> object_contexts;
+  SharedLRU<hobject_t, ObjectContext> object_contexts;
   // map from oid.snapdir() to SnapSetContext *
-  map<hobject_t, SnapSetContext*, hobject_t::BitwiseComparator> snapset_contexts;
+  map<hobject_t, SnapSetContext*> snapset_contexts;
   Mutex snapset_contexts_lock;
 
   // debug order that client ops are applied
-  map<hobject_t, map<client_t, ceph_tid_t>, hobject_t::BitwiseComparator> debug_op_order;
+  map<hobject_t, map<client_t, ceph_tid_t>> debug_op_order;
 
   void populate_obc_watchers(ObjectContextRef obc);
   void check_blacklisted_obc_watchers(ObjectContextRef obc);
@@ -995,7 +995,7 @@ protected:
   }
   void put_snapset_context(SnapSetContext *ssc);
 
-  map<hobject_t, ObjectContextRef, hobject_t::BitwiseComparator> recovering;
+  map<hobject_t, ObjectContextRef> recovering;
 
   /*
    * Backfill
@@ -1011,8 +1011,8 @@ protected:
    *   - are not included in pg stats (yet)
    *   - have their stats in pending_backfill_updates on the primary
    */
-  set<hobject_t, hobject_t::Comparator> backfills_in_flight;
-  map<hobject_t, pg_stat_t, hobject_t::Comparator> pending_backfill_updates;
+  set<hobject_t> backfills_in_flight;
+  map<hobject_t, pg_stat_t> pending_backfill_updates;
 
   void dump_recovery_info(Formatter *f) const override {
     f->open_array_section("backfill_targets");
@@ -1045,7 +1045,7 @@ protected:
     }
     {
       f->open_array_section("backfills_in_flight");
-      for (set<hobject_t, hobject_t::BitwiseComparator>::const_iterator i = backfills_in_flight.begin();
+      for (set<hobject_t>::const_iterator i = backfills_in_flight.begin();
           i != backfills_in_flight.end();
           ++i) {
        f->dump_stream("object") << *i;
@@ -1054,7 +1054,7 @@ protected:
     }
     {
       f->open_array_section("recovering");
-      for (map<hobject_t, ObjectContextRef, hobject_t::BitwiseComparator>::const_iterator i = recovering.begin();
+      for (map<hobject_t, ObjectContextRef>::const_iterator i = recovering.begin();
           i != recovering.end();
           ++i) {
        f->dump_stream("object") << i->first;
@@ -1233,7 +1233,7 @@ protected:
   void recover_got(hobject_t oid, eversion_t v);
 
   // -- copyfrom --
-  map<hobject_t, CopyOpRef, hobject_t::BitwiseComparator> copy_ops;
+  map<hobject_t, CopyOpRef> copy_ops;
 
   int fill_in_copy_get(
     OpContext *ctx,
@@ -1278,7 +1278,7 @@ protected:
   friend struct C_Copyfrom;
 
   // -- flush --
-  map<hobject_t, FlushOpRef, hobject_t::BitwiseComparator> flush_ops;
+  map<hobject_t, FlushOpRef> flush_ops;
 
   /// start_flush takes ownership of on_flush iff ret == -EINPROGRESS
   int start_flush(
@@ -1300,8 +1300,7 @@ protected:
     const hobject_t &begin, const hobject_t &end) override;
   virtual void scrub_snapshot_metadata(
     ScrubMap &map,
-    const std::map<hobject_t, pair<uint32_t, uint32_t>,
-    hobject_t::BitwiseComparator> &missing_digest) override;
+    const std::map<hobject_t, pair<uint32_t, uint32_t>> &missing_digest) override;
   virtual void _scrub_clear_state() override;
   virtual void _scrub_finish() override;
   object_stat_collection_t scrub_cstat;
@@ -1319,7 +1318,7 @@ protected:
   bool pgls_filter(PGLSFilter *filter, hobject_t& sobj, bufferlist& outdata);
   int get_pgls_filter(bufferlist::iterator& iter, PGLSFilter **pfilter);
 
-  map<hobject_t, list<OpRequestRef>, hobject_t::BitwiseComparator> in_progress_proxy_ops;
+  map<hobject_t, list<OpRequestRef>> in_progress_proxy_ops;
   void kick_proxy_ops_blocked(hobject_t& soid);
   void cancel_proxy_ops(bool requeue);
 
@@ -1456,7 +1455,7 @@ private:
   };
   struct SnapTrimmer : public boost::statechart::state_machine< SnapTrimmer, NotTrimming > {
     PrimaryLogPG *pg;
-    set<hobject_t, hobject_t::BitwiseComparator> in_flight;
+    set<hobject_t> in_flight;
     snapid_t snap_to_trim;
     explicit SnapTrimmer(PrimaryLogPG *pg) : pg(pg) {}
     ~SnapTrimmer();
index 976aa7f91178ec7084c09cb80b82933033d8e091..f94ddf8833923deed47a754136b1e55ed3560e40 100644 (file)
@@ -158,13 +158,13 @@ void ReplicatedBackend::recover_object(
 
 void ReplicatedBackend::check_recovery_sources(const OSDMapRef& osdmap)
 {
-  for(map<pg_shard_t, set<hobject_t, hobject_t::BitwiseComparator> >::iterator i = pull_from_peer.begin();
+  for(map<pg_shard_t, set<hobject_t> >::iterator i = pull_from_peer.begin();
       i != pull_from_peer.end();
       ) {
     if (osdmap->is_down(i->first.osd)) {
       dout(10) << "check_recovery_sources resetting pulls from osd." << i->first
               << ", osdmap has it marked down" << dendl;
-      for (set<hobject_t, hobject_t::BitwiseComparator>::iterator j = i->second.begin();
+      for (set<hobject_t>::iterator j = i->second.begin();
           j != i->second.end();
           ++j) {
        get_parent()->cancel_pull(*j);
@@ -388,8 +388,8 @@ void generate_transaction(
   bool legacy_log_entries,
   vector<pg_log_entry_t> &log_entries,
   ObjectStore::Transaction *t,
-  set<hobject_t, hobject_t::BitwiseComparator> *added,
-  set<hobject_t, hobject_t::BitwiseComparator> *removed)
+  set<hobject_t> *added,
+  set<hobject_t> *removed)
 {
   assert(t);
   assert(added);
@@ -551,7 +551,7 @@ void ReplicatedBackend::submit_transaction(
   vector<pg_log_entry_t> log_entries(_log_entries);
   ObjectStore::Transaction op_t;
   PGTransactionUPtr t(std::move(_t));
-  set<hobject_t, hobject_t::BitwiseComparator> added, removed;
+  set<hobject_t> added, removed;
   generate_transaction(
     t,
     coll,
@@ -1261,7 +1261,7 @@ void ReplicatedBackend::calc_head_subsets(
   const pg_missing_t& missing,
   const hobject_t &last_backfill,
   interval_set<uint64_t>& data_subset,
-  map<hobject_t, interval_set<uint64_t>, hobject_t::BitwiseComparator>& clone_subsets,
+  map<hobject_t, interval_set<uint64_t>>& clone_subsets,
   ObcLockManager &manager)
 {
   dout(10) << "calc_head_subsets " << head
@@ -1325,7 +1325,7 @@ void ReplicatedBackend::calc_clone_subsets(
   const pg_missing_t& missing,
   const hobject_t &last_backfill,
   interval_set<uint64_t>& data_subset,
-  map<hobject_t, interval_set<uint64_t>, hobject_t::BitwiseComparator>& clone_subsets,
+  map<hobject_t, interval_set<uint64_t>>& clone_subsets,
   ObcLockManager &manager)
 {
   dout(10) << "calc_clone_subsets " << soid
@@ -1419,11 +1419,11 @@ void ReplicatedBackend::prepare_pull(
   eversion_t _v = get_parent()->get_local_missing().get_items().find(
     soid)->second.need;
   assert(_v == v);
-  const map<hobject_t, set<pg_shard_t>, hobject_t::BitwiseComparator> &missing_loc(
+  const map<hobject_t, set<pg_shard_t>> &missing_loc(
     get_parent()->get_missing_loc_shards());
   const map<pg_shard_t, pg_missing_t > &peer_missing(
     get_parent()->get_shard_missing());
-  map<hobject_t, set<pg_shard_t>, hobject_t::BitwiseComparator>::const_iterator q = missing_loc.find(soid);
+  map<hobject_t, set<pg_shard_t>>::const_iterator q = missing_loc.find(soid);
   assert(q != missing_loc.end());
   assert(!q->second.empty());
 
@@ -1525,7 +1525,7 @@ void ReplicatedBackend::prep_push_to_replica(
   dout(10) << __func__ << ": " << soid << " v" << oi.version
           << " size " << size << " to osd." << peer << dendl;
 
-  map<hobject_t, interval_set<uint64_t>, hobject_t::BitwiseComparator> clone_subsets;
+  map<hobject_t, interval_set<uint64_t>> clone_subsets;
   interval_set<uint64_t> data_subset;
 
   ObcLockManager lock_manager;
@@ -1596,7 +1596,7 @@ void ReplicatedBackend::prep_push(ObjectContextRef obc,
   interval_set<uint64_t> data_subset;
   if (obc->obs.oi.size)
     data_subset.insert(0, obc->obs.oi.size);
-  map<hobject_t, interval_set<uint64_t>, hobject_t::BitwiseComparator> clone_subsets;
+  map<hobject_t, interval_set<uint64_t>> clone_subsets;
 
   prep_push(obc, soid, peer,
            obc->obs.oi.version, data_subset, clone_subsets,
@@ -1608,7 +1608,7 @@ void ReplicatedBackend::prep_push(
   const hobject_t& soid, pg_shard_t peer,
   eversion_t version,
   interval_set<uint64_t> &data_subset,
-  map<hobject_t, interval_set<uint64_t>, hobject_t::BitwiseComparator>& clone_subsets,
+  map<hobject_t, interval_set<uint64_t>>& clone_subsets,
   PushOp *pop,
   bool cache_dont_need,
   ObcLockManager &&lock_manager)
@@ -1749,7 +1749,7 @@ void ReplicatedBackend::submit_push_data(
 void ReplicatedBackend::submit_push_complete(ObjectRecoveryInfo &recovery_info,
                                             ObjectStore::Transaction *t)
 {
-  for (map<hobject_t, interval_set<uint64_t>, hobject_t::BitwiseComparator>::const_iterator p =
+  for (map<hobject_t, interval_set<uint64_t>>::const_iterator p =
         recovery_info.clone_subset.begin();
        p != recovery_info.clone_subset.end();
        ++p) {
@@ -2414,7 +2414,7 @@ void ReplicatedBackend::_failed_push(pg_shard_t from, const hobject_t &soid)
 }
 
 void ReplicatedBackend::clear_pull(
-  map<hobject_t, PullInfo, hobject_t::BitwiseComparator>::iterator piter,
+  map<hobject_t, PullInfo>::iterator piter,
   bool clear_pull_from_peer)
 {
   auto from = piter->second.from;
index efe795d74f2d952cdc328611424cc95a2f74a753..2b021845bf52ebba105651452c15d949f6162832 100644 (file)
@@ -95,14 +95,14 @@ public:
   virtual void dump_recovery_info(Formatter *f) const {
     {
       f->open_array_section("pull_from_peer");
-      for (map<pg_shard_t, set<hobject_t, hobject_t::BitwiseComparator> >::const_iterator i = pull_from_peer.begin();
+      for (map<pg_shard_t, set<hobject_t> >::const_iterator i = pull_from_peer.begin();
           i != pull_from_peer.end();
           ++i) {
        f->open_object_section("pulling_from");
        f->dump_stream("pull_from") << i->first;
        {
          f->open_array_section("pulls");
-         for (set<hobject_t, hobject_t::BitwiseComparator>::const_iterator j = i->second.begin();
+         for (set<hobject_t>::const_iterator j = i->second.begin();
               j != i->second.end();
               ++j) {
            f->open_object_section("pull_info");
@@ -118,7 +118,7 @@ public:
     }
     {
       f->open_array_section("pushing");
-      for (map<hobject_t, map<pg_shard_t, PushInfo>, hobject_t::BitwiseComparator>::const_iterator i =
+      for (map<hobject_t, map<pg_shard_t, PushInfo>>::const_iterator i =
             pushing.begin();
           i != pushing.end();
           ++i) {
@@ -182,7 +182,7 @@ private:
       }
     }
   };
-  map<hobject_t, map<pg_shard_t, PushInfo>, hobject_t::BitwiseComparator> pushing;
+  map<hobject_t, map<pg_shard_t, PushInfo>> pushing;
 
   // pull
   struct PullInfo {
@@ -214,12 +214,12 @@ private:
     }
   };
 
-  map<hobject_t, PullInfo, hobject_t::BitwiseComparator> pulling;
+  map<hobject_t, PullInfo> pulling;
 
   // Reverse mapping from osd peer to objects beging pulled from that peer
-  map<pg_shard_t, set<hobject_t, hobject_t::BitwiseComparator> > pull_from_peer;
+  map<pg_shard_t, set<hobject_t> > pull_from_peer;
   void clear_pull(
-    map<hobject_t, PullInfo, hobject_t::BitwiseComparator>::iterator piter,
+    map<hobject_t, PullInfo>::iterator piter,
     bool clear_pull_from_peer = true);
 
   void sub_op_push(OpRequestRef op);
@@ -294,7 +294,7 @@ private:
     SnapSet& snapset, const hobject_t& poid, const pg_missing_t& missing,
     const hobject_t &last_backfill,
     interval_set<uint64_t>& data_subset,
-    map<hobject_t, interval_set<uint64_t>, hobject_t::BitwiseComparator>& clone_subsets,
+    map<hobject_t, interval_set<uint64_t>>& clone_subsets,
     ObcLockManager &lock_manager);
   void prepare_pull(
     eversion_t v,
@@ -318,7 +318,7 @@ private:
     const hobject_t& soid, pg_shard_t peer,
     eversion_t version,
     interval_set<uint64_t> &data_subset,
-    map<hobject_t, interval_set<uint64_t>, hobject_t::BitwiseComparator>& clone_subsets,
+    map<hobject_t, interval_set<uint64_t>>& clone_subsets,
     PushOp *op,
     bool cache,
     ObcLockManager &&lock_manager);
@@ -327,7 +327,7 @@ private:
     const pg_missing_t& missing,
     const hobject_t &last_backfill,
     interval_set<uint64_t>& data_subset,
-    map<hobject_t, interval_set<uint64_t>, hobject_t::BitwiseComparator>& clone_subsets,
+    map<hobject_t, interval_set<uint64_t>>& clone_subsets,
     ObcLockManager &lock_manager);
   ObjectRecoveryInfo recalc_subsets(
     const ObjectRecoveryInfo& recovery_info,
index 39591fa89700f293299fab62704c1f8bc3f7c983..125bd1f15790b2ec75f7933e7499324bed420fee 100644 (file)
@@ -11,7 +11,7 @@
 
 void Session::clear_backoffs()
 {
-  map<hobject_t,set<BackoffRef>,hobject_t::BitwiseComparator> ls;
+  map<hobject_t,set<BackoffRef>> ls;
   {
     Mutex::Locker l(backoff_lock);
     ls.swap(backoffs);
index c6c80011599cdde2c1f5235dfe57780f262aa400..6492c4bd4e4fd4baed28a5ec6e387c0758ed9c14 100644 (file)
@@ -139,7 +139,7 @@ struct Session : public RefCountedObject {
   /// protects backoffs; orders inside Backoff::lock *and* PG::backoff_lock
   Mutex backoff_lock;
   std::atomic_int backoff_count= {0};  ///< simple count of backoffs
-  map<hobject_t,set<BackoffRef>, hobject_t::BitwiseComparator> backoffs;
+  map<hobject_t,set<BackoffRef>> backoffs;
 
   std::atomic<uint64_t> backoff_seq = {0};
 
index 93a8664549c341f458cf9737930419e5604f2240..ff3c97268b6c824a93eb61b7c991525cca7e147c 100644 (file)
@@ -4853,9 +4853,9 @@ void ObjectRecoveryInfo::decode(bufferlist::iterator &bl,
   if (struct_v < 2) {
     if (!soid.is_max() && soid.pool == -1)
       soid.pool = pool;
-    map<hobject_t, interval_set<uint64_t>, hobject_t::BitwiseComparator> tmp;
+    map<hobject_t, interval_set<uint64_t>> tmp;
     tmp.swap(clone_subset);
-    for (map<hobject_t, interval_set<uint64_t>, hobject_t::BitwiseComparator>::iterator i = tmp.begin();
+    for (map<hobject_t, interval_set<uint64_t>>::iterator i = tmp.begin();
         i != tmp.end();
         ++i) {
       hobject_t first(i->first);
@@ -5134,11 +5134,11 @@ void ScrubMap::merge_incr(const ScrubMap &l)
   assert(valid_through == l.incr_since);
   valid_through = l.valid_through;
 
-  for (map<hobject_t,object, hobject_t::BitwiseComparator>::const_iterator p = l.objects.begin();
+  for (map<hobject_t,object>::const_iterator p = l.objects.begin();
        p != l.objects.end();
        ++p){
     if (p->second.negative) {
-      map<hobject_t,object, hobject_t::BitwiseComparator>::iterator q = objects.find(p->first);
+      map<hobject_t,object>::iterator q = objects.find(p->first);
       if (q != objects.end()) {
        objects.erase(q);
       }
@@ -5176,9 +5176,9 @@ void ScrubMap::decode(bufferlist::iterator& bl, int64_t pool)
 
   // handle hobject_t upgrade
   if (struct_v < 3) {
-    map<hobject_t, object, hobject_t::ComparatorWithDefault> tmp;
+    map<hobject_t, object> tmp;
     tmp.swap(objects);
-    for (map<hobject_t, object, hobject_t::ComparatorWithDefault>::iterator i = tmp.begin();
+    for (map<hobject_t, object>::iterator i = tmp.begin();
         i != tmp.end();
         ++i) {
       hobject_t first(i->first);
@@ -5194,7 +5194,7 @@ void ScrubMap::dump(Formatter *f) const
   f->dump_stream("valid_through") << valid_through;
   f->dump_stream("incremental_since") << incr_since;
   f->open_array_section("objects");
-  for (map<hobject_t,object, hobject_t::ComparatorWithDefault>::const_iterator p = objects.begin(); p != objects.end(); ++p) {
+  for (map<hobject_t,object>::const_iterator p = objects.begin(); p != objects.end(); ++p) {
     f->open_object_section("object");
     f->dump_string("name", p->first.oid.name);
     f->dump_unsigned("hash", p->first.get_hash());
index 8a30b287856b0505bcc346c9139faef10aa05221..c335d3ed44d8d1f2540b07b923f33788dc0263ab 100644 (file)
@@ -3120,7 +3120,7 @@ ostream& operator<<(ostream& out, const pg_missing_item &item);
 
 class pg_missing_const_i {
 public:
-  virtual const map<hobject_t, pg_missing_item, hobject_t::ComparatorWithDefault> &
+  virtual const map<hobject_t, pg_missing_item> &
     get_items() const = 0;
   virtual const map<version_t, hobject_t> &get_rmissing() const = 0;
   virtual unsigned int num_missing() const = 0;
@@ -3145,7 +3145,7 @@ public:
 };
 template <>
 class ChangeTracker<true> {
-  set<hobject_t, hobject_t::BitwiseComparator> _changed;
+  set<hobject_t> _changed;
 public:
   void changed(const hobject_t &obj) {
     _changed.insert(obj);
@@ -3167,7 +3167,7 @@ public:
 template <bool TrackChanges>
 class pg_missing_set : public pg_missing_const_i {
   using item = pg_missing_item;
-  map<hobject_t, item, hobject_t::ComparatorWithDefault> missing;  // oid -> (need v, have v)
+  map<hobject_t, item> missing;  // oid -> (need v, have v)
   map<version_t, hobject_t> rmissing;  // v -> oid
   ChangeTracker<TrackChanges> tracker;
 
@@ -3184,7 +3184,7 @@ public:
       tracker.changed(i.first);
   }
 
-  const map<hobject_t, item, hobject_t::ComparatorWithDefault> &get_items() const override {
+  const map<hobject_t, item> &get_items() const override {
     return missing;
   }
   const map<version_t, hobject_t> &get_rmissing() const override {
@@ -3205,7 +3205,7 @@ public:
     return true;
   }
   bool is_missing(const hobject_t& oid, eversion_t v) const override {
-    map<hobject_t, item, hobject_t::ComparatorWithDefault>::const_iterator m =
+    map<hobject_t, item>::const_iterator m =
       missing.find(oid);
     if (m == missing.end())
       return false;
@@ -3215,7 +3215,7 @@ public:
     return true;
   }
   eversion_t have_old(const hobject_t& oid) const override {
-    map<hobject_t, item, hobject_t::ComparatorWithDefault>::const_iterator m =
+    map<hobject_t, item>::const_iterator m =
       missing.find(oid);
     if (m == missing.end())
       return eversion_t();
@@ -3235,7 +3235,7 @@ public:
    */
   void add_next_event(const pg_log_entry_t& e) {
     if (e.is_update()) {
-      map<hobject_t, item, hobject_t::ComparatorWithDefault>::iterator missing_it;
+      map<hobject_t, item>::iterator missing_it;
       missing_it = missing.find(e.soid);
       bool is_missing_divergent_item = missing_it != missing.end();
       if (e.prior_version == eversion_t() || e.is_clone()) {
@@ -3291,25 +3291,25 @@ public:
   }
 
   void rm(const hobject_t& oid, eversion_t v) {
-    std::map<hobject_t, item, hobject_t::ComparatorWithDefault>::iterator p = missing.find(oid);
+    std::map<hobject_t, item>::iterator p = missing.find(oid);
     if (p != missing.end() && p->second.need <= v)
       rm(p);
   }
 
-  void rm(std::map<hobject_t, item, hobject_t::ComparatorWithDefault>::const_iterator m) {
+  void rm(std::map<hobject_t, item>::const_iterator m) {
     tracker.changed(m->first);
     rmissing.erase(m->second.need.version);
     missing.erase(m);
   }
 
   void got(const hobject_t& oid, eversion_t v) {
-    std::map<hobject_t, item, hobject_t::ComparatorWithDefault>::iterator p = missing.find(oid);
+    std::map<hobject_t, item>::iterator p = missing.find(oid);
     assert(p != missing.end());
     assert(p->second.need <= v);
     got(p);
   }
 
-  void got(std::map<hobject_t, item, hobject_t::ComparatorWithDefault>::const_iterator m) {
+  void got(std::map<hobject_t, item>::const_iterator m) {
     tracker.changed(m->first);
     rmissing.erase(m->second.need.version);
     missing.erase(m);
@@ -3320,7 +3320,7 @@ public:
     unsigned split_bits,
     pg_missing_set *omissing) {
     unsigned mask = ~((~0)<<split_bits);
-    for (map<hobject_t, item, hobject_t::ComparatorWithDefault>::iterator i = missing.begin();
+    for (map<hobject_t, item>::iterator i = missing.begin();
         i != missing.end();
       ) {
       if ((i->first.get_hash() & mask) == child_pgid.m_seed) {
@@ -3339,16 +3339,6 @@ public:
     rmissing.clear();
   }
 
-  void resort(bool sort_bitwise) {
-    if (missing.key_comp().bitwise != sort_bitwise) {
-      map<hobject_t, item, hobject_t::ComparatorWithDefault> tmp;
-      tmp.swap(missing);
-      missing = map<hobject_t, item, hobject_t::ComparatorWithDefault>(
-       hobject_t::ComparatorWithDefault(sort_bitwise));
-      missing.insert(tmp.begin(), tmp.end());
-    }
-  }
-
   void encode(bufferlist &bl) const {
     ENCODE_START(3, 2, bl);
     ::encode(missing, bl);
@@ -3363,8 +3353,8 @@ public:
 
     if (struct_v < 3) {
       // Handle hobject_t upgrade
-      map<hobject_t, item, hobject_t::ComparatorWithDefault> tmp;
-      for (map<hobject_t, item, hobject_t::ComparatorWithDefault>::iterator i =
+      map<hobject_t, item> tmp;
+      for (map<hobject_t, item>::iterator i =
             missing.begin();
           i != missing.end();
        ) {
@@ -3380,7 +3370,7 @@ public:
       missing.insert(tmp.begin(), tmp.end());
     }
 
-    for (map<hobject_t,item, hobject_t::ComparatorWithDefault>::iterator it =
+    for (map<hobject_t,item>::iterator it =
           missing.begin();
         it != missing.end();
         ++it)
@@ -3390,7 +3380,7 @@ public:
   }
   void dump(Formatter *f) const {
     f->open_array_section("missing");
-    for (map<hobject_t,item, hobject_t::ComparatorWithDefault>::const_iterator p =
+    for (map<hobject_t,item>::const_iterator p =
           missing.begin(); p != missing.end(); ++p) {
       f->open_object_section("item");
       f->dump_stream("object") << p->first;
@@ -3462,7 +3452,7 @@ public:
     }
     if (oss && !ok) {
       *oss << "check_missing: " << check_missing << "\n";
-      set<hobject_t, hobject_t::BitwiseComparator> changed;
+      set<hobject_t> changed;
       tracker.get_changed([&](const hobject_t &hoid) { changed.insert(hoid); });
       *oss << "changed: " << changed << "\n";
     }
@@ -4498,7 +4488,7 @@ class ObcLockManager {
       ObjectContext::RWState::State type)
       : obc(obc), type(type) {}
   };
-  map<hobject_t, ObjectLockState, hobject_t::BitwiseComparator> locks;
+  map<hobject_t, ObjectLockState> locks;
 public:
   ObcLockManager() = default;
   ObcLockManager(ObcLockManager &&) = default;
@@ -4616,7 +4606,7 @@ struct ObjectRecoveryInfo {
   object_info_t oi;
   SnapSet ss;
   interval_set<uint64_t> copy_subset;
-  map<hobject_t, interval_set<uint64_t>, hobject_t::BitwiseComparator> clone_subset;
+  map<hobject_t, interval_set<uint64_t>> clone_subset;
 
   ObjectRecoveryInfo() : size(0) { }
 
@@ -4746,13 +4736,13 @@ struct ScrubMap {
   WRITE_CLASS_ENCODER(object)
 
   bool bitwise; // ephemeral, not encoded
-  map<hobject_t,object, hobject_t::ComparatorWithDefault> objects;
+  map<hobject_t,object> objects;
   eversion_t valid_through;
   eversion_t incr_since;
 
   ScrubMap() : bitwise(true) {}
   ScrubMap(bool bitwise)
-    : bitwise(bitwise), objects(hobject_t::ComparatorWithDefault(bitwise)) {}
+    : bitwise(bitwise) {}
 
   void merge_incr(const ScrubMap &l);
   void insert(const ScrubMap &r) {
@@ -4770,10 +4760,9 @@ struct ScrubMap {
   void reset_bitwise(bool new_bitwise) {
     if (bitwise == new_bitwise)
       return;
-    map<hobject_t, object, hobject_t::ComparatorWithDefault> new_objects(
+    map<hobject_t, object> new_objects(
       objects.begin(),
-      objects.end(),
-      hobject_t::ComparatorWithDefault(new_bitwise));
+      objects.end());
     ::swap(new_objects, objects);
     bitwise = new_bitwise;
   }
index 95d665a7a2d3260f9012813c35f0dc30628096b7..09ae6d7061f59364efcb1ae208bba475b8c03b2d 100644 (file)
@@ -1807,7 +1807,7 @@ public:
     map<ceph_tid_t,CommandOp*> command_ops;
 
     // backoffs
-    map<hobject_t,OSDBackoff,hobject_t::BitwiseComparator> backoffs;
+    map<hobject_t,OSDBackoff> backoffs;
     multimap<uint64_t,OSDBackoff*> backoffs_by_id;
 
     int osd;
index dbfd4f98830b40b76503ab9db71dd2631132da78..76f6a2687e7dfd9eea0a355fa032c5eea305d56b 100644 (file)
@@ -2218,7 +2218,7 @@ TEST_P(StoreTest, SimpleListTest) {
     r = apply_transaction(store, &osr, std::move(t));
     ASSERT_EQ(r, 0);
   }
-  set<ghobject_t, ghobject_t::BitwiseComparator> all;
+  set<ghobject_t> all;
   {
     ObjectStore::Transaction t;
     for (int i=0; i<200; ++i) {
@@ -2235,7 +2235,7 @@ TEST_P(StoreTest, SimpleListTest) {
     ASSERT_EQ(r, 0);
   }
   {
-    set<ghobject_t, ghobject_t::BitwiseComparator> saw;
+    set<ghobject_t> saw;
     vector<ghobject_t> objects;
     ghobject_t next, current;
     while (!next.is_max()) {
@@ -2262,7 +2262,7 @@ TEST_P(StoreTest, SimpleListTest) {
   }
   {
     ObjectStore::Transaction t;
-    for (set<ghobject_t, ghobject_t::BitwiseComparator>::iterator p = all.begin(); p != all.end(); ++p)
+    for (set<ghobject_t>::iterator p = all.begin(); p != all.end(); ++p)
       t.remove(cid, *p);
     t.remove_collection(cid);
     cerr << "Cleaning" << std::endl;
@@ -2282,7 +2282,7 @@ TEST_P(StoreTest, ListEndTest) {
     r = apply_transaction(store, &osr, std::move(t));
     ASSERT_EQ(r, 0);
   }
-  set<ghobject_t, ghobject_t::BitwiseComparator> all;
+  set<ghobject_t> all;
   {
     ObjectStore::Transaction t;
     for (int i=0; i<200; ++i) {
@@ -2313,7 +2313,7 @@ TEST_P(StoreTest, ListEndTest) {
   }
   {
     ObjectStore::Transaction t;
-    for (set<ghobject_t, ghobject_t::BitwiseComparator>::iterator p = all.begin(); p != all.end(); ++p)
+    for (set<ghobject_t>::iterator p = all.begin(); p != all.end(); ++p)
       t.remove(cid, *p);
     t.remove_collection(cid);
     cerr << "Cleaning" << std::endl;
@@ -2362,7 +2362,7 @@ TEST_P(StoreTest, MultipoolListTest) {
     r = apply_transaction(store, &osr, std::move(t));
     ASSERT_EQ(r, 0);
   }
-  set<ghobject_t, ghobject_t::BitwiseComparator> all, saw;
+  set<ghobject_t> all, saw;
   {
     ObjectStore::Transaction t;
     for (int i=0; i<200; ++i) {
@@ -2399,7 +2399,7 @@ TEST_P(StoreTest, MultipoolListTest) {
   }
   {
     ObjectStore::Transaction t;
-    for (set<ghobject_t, ghobject_t::BitwiseComparator>::iterator p = all.begin(); p != all.end(); ++p)
+    for (set<ghobject_t>::iterator p = all.begin(); p != all.end(); ++p)
       t.remove(cid, *p);
     t.remove_collection(cid);
     cerr << "Cleaning" << std::endl;
@@ -3013,7 +3013,7 @@ TEST_P(StoreTest, ManyObjectTest) {
   coll_t cid;
   string base = "";
   for (int i = 0; i < 100; ++i) base.append("aaaaa");
-  set<ghobject_t, ghobject_t::BitwiseComparator> created;
+  set<ghobject_t> created;
   {
     ObjectStore::Transaction t;
     t.create_collection(cid, 0);
@@ -3034,14 +3034,14 @@ TEST_P(StoreTest, ManyObjectTest) {
     ASSERT_EQ(r, 0);
   }
 
-  for (set<ghobject_t, ghobject_t::BitwiseComparator>::iterator i = created.begin();
+  for (set<ghobject_t>::iterator i = created.begin();
        i != created.end();
        ++i) {
     struct stat buf;
     ASSERT_TRUE(!store->stat(cid, *i, &buf));
   }
 
-  set<ghobject_t, ghobject_t::BitwiseComparator> listed, listed2;
+  set<ghobject_t> listed, listed2;
   vector<ghobject_t> objects;
   r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), INT_MAX, &objects, 0);
   ASSERT_EQ(r, 0);
@@ -3091,13 +3091,13 @@ TEST_P(StoreTest, ManyObjectTest) {
   ASSERT_TRUE(listed.size() == created.size());
   if (listed2.size())
     ASSERT_EQ(listed.size(), listed2.size());
-  for (set<ghobject_t, ghobject_t::BitwiseComparator>::iterator i = listed.begin();
+  for (set<ghobject_t>::iterator i = listed.begin();
        i != listed.end();
        ++i) {
     ASSERT_TRUE(created.count(*i));
   }
 
-  for (set<ghobject_t, ghobject_t::BitwiseComparator>::iterator i = created.begin();
+  for (set<ghobject_t>::iterator i = created.begin();
        i != created.end();
        ++i) {
     ObjectStore::Transaction t;
@@ -3160,9 +3160,9 @@ public:
   unsigned write_alignment;
   unsigned max_object_len, max_write_len;
   unsigned in_flight;
-  map<ghobject_t, Object, ghobject_t::BitwiseComparator> contents;
-  set<ghobject_t, ghobject_t::BitwiseComparator> available_objects;
-  set<ghobject_t, ghobject_t::BitwiseComparator> in_flight_objects;
+  map<ghobject_t, Object> contents;
+  set<ghobject_t> available_objects;
+  set<ghobject_t> in_flight_objects;
   ObjectGenerator *object_gen;
   gen_type *rng;
   ObjectStore *store;
@@ -3323,7 +3323,7 @@ public:
       cond.Wait(lock);
     boost::uniform_int<> choose(0, available_objects.size() - 1);
     int index = choose(*rng);
-    set<ghobject_t, ghobject_t::BitwiseComparator>::iterator i = available_objects.begin();
+    set<ghobject_t>::iterator i = available_objects.begin();
     for ( ; index > 0; --index, ++i) ;
     ghobject_t ret = *i;
     return ret;
@@ -3869,7 +3869,7 @@ public:
     while (in_flight)
       cond.Wait(lock);
     vector<ghobject_t> objects;
-    set<ghobject_t, ghobject_t::BitwiseComparator> objects_set, objects_set2;
+    set<ghobject_t> objects_set, objects_set2;
     ghobject_t next, current;
     while (1) {
       //cerr << "scanning..." << std::endl;
@@ -3901,7 +3901,7 @@ public:
     }
 
     ASSERT_EQ(objects_set.size(), available_objects.size());
-    for (set<ghobject_t, ghobject_t::BitwiseComparator>::iterator i = objects_set.begin();
+    for (set<ghobject_t>::iterator i = objects_set.begin();
         i != objects_set.end();
         ++i) {
       ASSERT_GT(available_objects.count(*i), (unsigned)0);
@@ -3912,7 +3912,7 @@ public:
     ASSERT_EQ(r, 0);
     objects_set2.insert(objects.begin(), objects.end());
     ASSERT_EQ(objects_set2.size(), available_objects.size());
-    for (set<ghobject_t, ghobject_t::BitwiseComparator>::iterator i = objects_set2.begin();
+    for (set<ghobject_t>::iterator i = objects_set2.begin();
         i != objects_set2.end();
         ++i) {
       ASSERT_GT(available_objects.count(*i), (unsigned)0);
@@ -4368,7 +4368,7 @@ TEST_P(StoreTest, HashCollisionTest) {
   }
   string base = "";
   for (int i = 0; i < 100; ++i) base.append("aaaaa");
-  set<ghobject_t, ghobject_t::BitwiseComparator> created;
+  set<ghobject_t> created;
   for (int n = 0; n < 10; ++n) {
     char nbuf[100];
     sprintf(nbuf, "n%d", n);
@@ -4391,7 +4391,7 @@ TEST_P(StoreTest, HashCollisionTest) {
   vector<ghobject_t> objects;
   r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(), INT_MAX, &objects, 0);
   ASSERT_EQ(r, 0);
-  set<ghobject_t, ghobject_t::BitwiseComparator> listed(objects.begin(), objects.end());
+  set<ghobject_t> listed(objects.begin(), objects.end());
   cerr << "listed.size() is " << listed.size() << " and created.size() is " << created.size() << std::endl;
   ASSERT_TRUE(listed.size() == created.size());
   objects.clear();
@@ -4418,13 +4418,13 @@ TEST_P(StoreTest, HashCollisionTest) {
   }
   cerr << "listed.size() is " << listed.size() << std::endl;
   ASSERT_TRUE(listed.size() == created.size());
-  for (set<ghobject_t, ghobject_t::BitwiseComparator>::iterator i = listed.begin();
+  for (set<ghobject_t>::iterator i = listed.begin();
        i != listed.end();
        ++i) {
     ASSERT_TRUE(created.count(*i));
   }
 
-  for (set<ghobject_t, ghobject_t::BitwiseComparator>::iterator i = created.begin();
+  for (set<ghobject_t>::iterator i = created.begin();
        i != created.end();
        ++i) {
     ObjectStore::Transaction t;
@@ -4450,7 +4450,7 @@ TEST_P(StoreTest, ScrubTest) {
     ASSERT_EQ(r, 0);
   }
   string base = "aaaaa";
-  set<ghobject_t, ghobject_t::BitwiseComparator> created;
+  set<ghobject_t> created;
   for (int i = 0; i < 1000; ++i) {
     char buf[100];
     sprintf(buf, "%d", i);
@@ -4490,7 +4490,7 @@ TEST_P(StoreTest, ScrubTest) {
   r = store->collection_list(cid, ghobject_t(), ghobject_t::get_max(),
                             INT_MAX, &objects, 0);
   ASSERT_EQ(r, 0);
-  set<ghobject_t, ghobject_t::BitwiseComparator> listed(objects.begin(), objects.end());
+  set<ghobject_t> listed(objects.begin(), objects.end());
   cerr << "listed.size() is " << listed.size() << " and created.size() is " << created.size() << std::endl;
   ASSERT_TRUE(listed.size() == created.size());
   objects.clear();
@@ -4516,13 +4516,13 @@ TEST_P(StoreTest, ScrubTest) {
   }
   cerr << "listed.size() is " << listed.size() << std::endl;
   ASSERT_TRUE(listed.size() == created.size());
-  for (set<ghobject_t, ghobject_t::BitwiseComparator>::iterator i = listed.begin();
+  for (set<ghobject_t>::iterator i = listed.begin();
        i != listed.end();
        ++i) {
     ASSERT_TRUE(created.count(*i));
   }
 
-  for (set<ghobject_t, ghobject_t::BitwiseComparator>::iterator i = created.begin();
+  for (set<ghobject_t>::iterator i = created.begin();
        i != created.end();
        ++i) {
     ObjectStore::Transaction t;
index f1b12629c6157048fed192ceaabace571f80a465..e6e7c0e36655537ab965a332f38f631d6731cec5 100644 (file)
@@ -92,7 +92,7 @@ public:
     pg_missing_t init;
     pg_missing_t final;
 
-    set<hobject_t, hobject_t::BitwiseComparator> toremove;
+    set<hobject_t> toremove;
     list<pg_log_entry_t> torollback;
 
   private:
@@ -153,7 +153,7 @@ public:
   };
 
   struct LogHandler : public PGLog::LogEntryHandler {
-    set<hobject_t, hobject_t::BitwiseComparator> removed;
+    set<hobject_t> removed;
     list<pg_log_entry_t> rolledback;
     
     void rollback(
@@ -204,8 +204,8 @@ public:
     }
 
     {
-      set<hobject_t, hobject_t::BitwiseComparator>::const_iterator titer = tcase.toremove.begin();
-      set<hobject_t, hobject_t::BitwiseComparator>::const_iterator hiter = handler.removed.begin();
+      set<hobject_t>::const_iterator titer = tcase.toremove.begin();
+      set<hobject_t>::const_iterator hiter = handler.removed.begin();
       for (; titer != tcase.toremove.end(); ++titer, ++hiter) {
        EXPECT_EQ(*titer, *hiter);
       }
index a48fd03a95185fdecb09ef9a3f51372170e63c86..db4924a97d8fce31d9e68506ba6e5f7fc30cd8b0 100644 (file)
@@ -438,8 +438,8 @@ TEST_F(MapCacherTest, Random)
 class MapperVerifier {
   PausyAsyncMap *driver;
   boost::scoped_ptr< SnapMapper > mapper;
-  map<snapid_t, set<hobject_t, hobject_t::BitwiseComparator> > snap_to_hobject;
-  map<hobject_t, set<snapid_t>, hobject_t::BitwiseComparator> hobject_to_snap;
+  map<snapid_t, set<hobject_t> > snap_to_hobject;
+  map<hobject_t, set<snapid_t>> hobject_to_snap;
   snapid_t next;
   uint32_t mask;
   uint32_t bits;
@@ -491,7 +491,7 @@ public:
     for (set<snapid_t>::iterator i = snaps.begin();
         i != snaps.end();
         ++i) {
-      map<snapid_t, set<hobject_t, hobject_t::BitwiseComparator> >::iterator j = snap_to_hobject.find(*i);
+      map<snapid_t, set<hobject_t> >::iterator j = snap_to_hobject.find(*i);
       assert(j != snap_to_hobject.end());
       j->second.insert(obj);
     }
@@ -506,9 +506,9 @@ public:
     Mutex::Locker l(lock);
     if (snap_to_hobject.empty())
       return;
-    map<snapid_t, set<hobject_t, hobject_t::BitwiseComparator> >::iterator snap =
+    map<snapid_t, set<hobject_t> >::iterator snap =
       rand_choose(snap_to_hobject);
-    set<hobject_t, hobject_t::BitwiseComparator> hobjects = snap->second;
+    set<hobject_t> hobjects = snap->second;
 
     vector<hobject_t> hoids;
     while (mapper->get_next_objects_to_trim(
@@ -518,7 +518,7 @@ public:
        assert(hobjects.count(hoid));
        hobjects.erase(hoid);
 
-       map<hobject_t, set<snapid_t>, hobject_t::BitwiseComparator>::iterator j =
+       map<hobject_t, set<snapid_t>>::iterator j =
          hobject_to_snap.find(hoid);
        assert(j->second.count(snap->first));
        set<snapid_t> old_snaps(j->second);
@@ -548,12 +548,12 @@ public:
     Mutex::Locker l(lock);
     if (hobject_to_snap.empty())
       return;
-    map<hobject_t, set<snapid_t>, hobject_t::BitwiseComparator>::iterator obj =
+    map<hobject_t, set<snapid_t>>::iterator obj =
       rand_choose(hobject_to_snap);
     for (set<snapid_t>::iterator i = obj->second.begin();
         i != obj->second.end();
         ++i) {
-      map<snapid_t, set<hobject_t, hobject_t::BitwiseComparator> >::iterator j =
+      map<snapid_t, set<hobject_t> >::iterator j =
        snap_to_hobject.find(*i);
       assert(j->second.count(obj->first));
       j->second.erase(obj->first);
@@ -572,7 +572,7 @@ public:
     Mutex::Locker l(lock);
     if (hobject_to_snap.empty())
       return;
-    map<hobject_t, set<snapid_t>, hobject_t::BitwiseComparator>::iterator obj =
+    map<hobject_t, set<snapid_t>>::iterator obj =
       rand_choose(hobject_to_snap);
     set<snapid_t> snaps;
     int r = mapper->get_snaps(obj->first, &snaps);