From f76baf1e9b239fe8b41ceb248e26d4c9fc16a273 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Fri, 8 Jul 2011 11:16:01 -0700 Subject: [PATCH] src/osd/: s/sobject_t/hobject_t/g Signed-off-by: Samuel Just --- src/osd/Ager.cc | 4 +- src/osd/OSD.cc | 48 +++++----- src/osd/OSD.h | 22 ++--- src/osd/PG.cc | 106 ++++++++++----------- src/osd/PG.h | 72 +++++++-------- src/osd/ReplicatedPG.cc | 198 ++++++++++++++++++++-------------------- src/osd/ReplicatedPG.h | 72 +++++++-------- src/osd/osd_types.cc | 4 +- src/osd/osd_types.h | 10 +- 9 files changed, 268 insertions(+), 268 deletions(-) diff --git a/src/osd/Ager.cc b/src/osd/Ager.cc index 71753f8facc6a..a0e064f6050c0 100644 --- a/src/osd/Ager.cc +++ b/src/osd/Ager.cc @@ -115,7 +115,7 @@ uint64_t Ager::age_fill(float pc, utime_t until) { bufferlist sbl; sbl.substr_of(bl, 0, t); ObjectStore::Transaction tr; - sobject_t oid(poid, 0); + hobject_t oid(poid, 0); tr.write(coll_t(), oid, off, t, sbl); store->apply_transaction(tr); off += t; @@ -157,7 +157,7 @@ void Ager::age_empty(float pc) { generic_dout(2) << "age_empty at " << free << " / " << avail << " / " << pc << " removing " << hex << poid << dec << dendl; ObjectStore::Transaction t; - sobject_t oid(poid, 0); + hobject_t oid(poid, 0); t.remove(coll_t(), oid); store->apply_transaction(t); age_free_oids.push_back(poid); diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 7c6327cd7b2c0..4fccc909429ec 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -202,7 +202,7 @@ int OSD::mkfs(const std::string &dev, const std::string &jdev, ceph_fsid_t fsid, object_t oid("disk_bw_test"); for (int i=0; i<1000; i++) { ObjectStore::Transaction *t = new ObjectStore::Transaction; - t->write(coll_t::META_COLL, sobject_t(oid, 0), i*bl.length(), bl.length(), bl); + t->write(coll_t::META_COLL, hobject_t(oid, 0), i*bl.length(), bl.length(), bl); store->queue_transaction(NULL, t); } store->sync(); @@ -210,7 +210,7 @@ int OSD::mkfs(const std::string &dev, const std::string &jdev, ceph_fsid_t fsid, end -= start; dout(0) << "measured " << (1000.0 / (double)end) << " mb/sec" << dendl; ObjectStore::Transaction tr; - tr.remove(coll_t::META_COLL, sobject_t(oid, 0)); + tr.remove(coll_t::META_COLL, hobject_t(oid, 0)); ret = store->apply_transaction(tr); if (ret) { derr << "OSD::mkfs: error while benchmarking: apply_transaction returned " @@ -867,7 +867,7 @@ void OSD::clear_temp() { dout(10) << "clear_temp" << dendl; - vector objects; + vector objects; store->collection_list(coll_t::TEMP_COLL, objects); dout(10) << objects.size() << " objects" << dendl; @@ -876,7 +876,7 @@ void OSD::clear_temp() // delete them. ObjectStore::Transaction *t = new ObjectStore::Transaction; - for (vector::iterator p = objects.begin(); + for (vector::iterator p = objects.begin(); p != objects.end(); p++) t->collection_remove(coll_t::TEMP_COLL, *p); @@ -940,8 +940,8 @@ PG *OSD::_open_lock_pg(pg_t pgid, bool no_lockdep_check) // create PG *pg; - sobject_t logoid = make_pg_log_oid(pgid); - sobject_t infooid = make_pg_biginfo_oid(pgid); + hobject_t logoid = make_pg_log_oid(pgid); + hobject_t infooid = make_pg_biginfo_oid(pgid); if (osdmap->get_pg_type(pgid) == CEPH_PG_TYPE_REP) pg = new ReplicatedPG(this, pool, pgid, logoid, infooid); else @@ -2133,7 +2133,7 @@ void OSD::handle_command(MMonCommand *m) char nm[30]; snprintf(nm, sizeof(nm), "disk_bw_test_%lld", (long long)pos); object_t oid(nm); - sobject_t soid(oid, 0); + hobject_t soid(oid, 0); ObjectStore::Transaction *t = new ObjectStore::Transaction; t->write(coll_t::META_COLL, soid, 0, bsize, bl); store->queue_transaction(NULL, t); @@ -2209,11 +2209,11 @@ void OSD::handle_command(MMonCommand *m) pg->lock(); fout << *pg << std::endl; - std::map::iterator mend = pg->missing.missing.end(); - std::map::iterator mi = pg->missing.missing.begin(); + std::map::iterator mend = pg->missing.missing.end(); + std::map::iterator mi = pg->missing.missing.begin(); for (; mi != mend; ++mi) { fout << mi->first << " -> " << mi->second << std::endl; - map >::const_iterator mli = + map >::const_iterator mli = pg->missing_loc.find(mi->first); if (mli == pg->missing_loc.end()) continue; @@ -2954,7 +2954,7 @@ void OSD::handle_osd_map(MOSDMap *m) o->decode(bl); add_map(o); - sobject_t fulloid = get_osdmap_pobject_name(e); + hobject_t fulloid = get_osdmap_pobject_name(e); t.write(coll_t::META_COLL, fulloid, 0, bl.length(), bl); add_map_bl(e, bl); continue; @@ -2964,7 +2964,7 @@ void OSD::handle_osd_map(MOSDMap *m) if (p != m->incremental_maps.end()) { dout(10) << "handle_osd_map got inc map for epoch " << e << dendl; bufferlist& bl = p->second; - sobject_t oid = get_inc_osdmap_pobject_name(e); + hobject_t oid = get_inc_osdmap_pobject_name(e); t.write(coll_t::META_COLL, oid, 0, bl.length(), bl); add_map_inc_bl(e, bl); @@ -2989,7 +2989,7 @@ void OSD::handle_osd_map(MOSDMap *m) bufferlist fbl; o->encode(fbl); - sobject_t fulloid = get_osdmap_pobject_name(e); + hobject_t fulloid = get_osdmap_pobject_name(e); t.write(coll_t::META_COLL, fulloid, 0, fbl.length(), fbl); add_map_bl(e, fbl); continue; @@ -3726,11 +3726,11 @@ void OSD::split_pg(PG *parent, map& children, ObjectStore::Transaction pg_t parentid = parent->info.pgid; // split objects - vector olist; + vector olist; store->collection_list(coll_t(parent->info.pgid), olist); - for (vector::iterator p = olist.begin(); p != olist.end(); p++) { - sobject_t poid = *p; + for (vector::iterator p = olist.begin(); p != olist.end(); p++) { + hobject_t poid = *p; ceph_object_layout l = osdmap->make_object_layout(poid.oid, parentid.pool(), parentid.preferred()); pg_t pgid = osdmap->raw_pg_to_pg(pg_t(l.ol_pgid)); if (pgid != parentid) { @@ -3779,7 +3779,7 @@ void OSD::split_pg(PG *parent, map& children, ObjectStore::Transaction while (p != parent->log.log.end()) { list::iterator cur = p; p++; - sobject_t& poid = cur->soid; + hobject_t& poid = cur->soid; ceph_object_layout l = osdmap->make_object_layout(poid.oid, parentid.pool(), parentid.preferred()); pg_t pgid = osdmap->raw_pg_to_pg(pg_t(l.ol_pgid)); if (pgid != parentid) { @@ -4402,10 +4402,10 @@ void OSD::_remove_pg(PG *pg) for (snapid_t cur = p.get_start(); cur < p.get_start() + p.get_len(); ++cur) { - vector olist; + vector olist; store->collection_list(coll_t(pgid, cur), olist); dout(10) << "_remove_pg " << pgid << " snap " << cur << " " << olist.size() << " objects" << dendl; - for (vector::iterator q = olist.begin(); + for (vector::iterator q = olist.begin(); q != olist.end(); q++) { ObjectStore::Transaction *t = new ObjectStore::Transaction; @@ -4429,10 +4429,10 @@ void OSD::_remove_pg(PG *pg) } // (what remains of the) main collection - vector olist; + vector olist; store->collection_list(coll_t(pgid), olist); dout(10) << "_remove_pg " << pgid << " " << olist.size() << " objects" << dendl; - for (vector::iterator p = olist.begin(); + for (vector::iterator p = olist.begin(); p != olist.end(); p++) { ObjectStore::Transaction *t = new ObjectStore::Transaction; @@ -4714,7 +4714,7 @@ void OSD::do_recovery(PG *pg) pg->put(); } -void OSD::start_recovery_op(PG *pg, const sobject_t& soid) +void OSD::start_recovery_op(PG *pg, const hobject_t& soid) { recovery_wq.lock(); dout(10) << "start_recovery_op " << *pg << " " << soid @@ -4732,7 +4732,7 @@ void OSD::start_recovery_op(PG *pg, const sobject_t& soid) recovery_wq.unlock(); } -void OSD::finish_recovery_op(PG *pg, const sobject_t& soid, bool dequeue) +void OSD::finish_recovery_op(PG *pg, const hobject_t& soid, bool dequeue) { dout(10) << "finish_recovery_op " << *pg << " " << soid << " dequeue=" << dequeue @@ -4961,7 +4961,7 @@ void OSD::handle_op(MOSDOp *op) if ((op->get_flags() & CEPH_OSD_FLAG_PGOP) == 0) { // missing object? - sobject_t head(op->get_oid(), CEPH_NOSNAP); + hobject_t head(op->get_oid(), CEPH_NOSNAP); if (pg->is_missing_object(head)) { pg->wait_for_missing_object(head, op); pg->unlock(); diff --git a/src/osd/OSD.h b/src/osd/OSD.h index a0fe866aa4f98..1c78eb31b4b70 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -158,31 +158,31 @@ public: ClassHandler *class_handler; int get_nodeid() { return whoami; } - static sobject_t get_osdmap_pobject_name(epoch_t epoch) { + static hobject_t get_osdmap_pobject_name(epoch_t epoch) { char foo[20]; snprintf(foo, sizeof(foo), "osdmap.%d", epoch); - return sobject_t(object_t(foo), 0); + return hobject_t(object_t(foo), 0); } - static sobject_t get_inc_osdmap_pobject_name(epoch_t epoch) { + static hobject_t get_inc_osdmap_pobject_name(epoch_t epoch) { char foo[20]; snprintf(foo, sizeof(foo), "inc_osdmap.%d", epoch); - return sobject_t(object_t(foo), 0); + return hobject_t(object_t(foo), 0); } - sobject_t make_pg_log_oid(pg_t pg) { + hobject_t make_pg_log_oid(pg_t pg) { stringstream ss; ss << "pglog_" << pg; string s; getline(ss, s); - return sobject_t(object_t(s.c_str()), 0); + return hobject_t(object_t(s.c_str()), 0); } - sobject_t make_pg_biginfo_oid(pg_t pg) { + hobject_t make_pg_biginfo_oid(pg_t pg) { stringstream ss; ss << "pginfo_" << pg; string s; getline(ss, s); - return sobject_t(object_t(s.c_str()), 0); + return hobject_t(object_t(s.c_str()), 0); } @@ -641,7 +641,7 @@ protected: utime_t defer_recovery_until; int recovery_ops_active; #ifdef DEBUG_RECOVERY_OIDS - map > recovery_oids; + map > recovery_oids; #endif struct RecoveryWQ : public ThreadPool::WorkQueue { @@ -693,8 +693,8 @@ protected: } recovery_wq; bool queue_for_recovery(PG *pg); - void start_recovery_op(PG *pg, const sobject_t& soid); - void finish_recovery_op(PG *pg, const sobject_t& soid, bool dequeue); + void start_recovery_op(PG *pg, const hobject_t& soid); + void finish_recovery_op(PG *pg, const hobject_t& soid, bool dequeue); void defer_recovery(PG *pg); void do_recovery(PG *pg); bool _recover_now(); diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 41e533f09bd52..430f1446235d8 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -216,7 +216,7 @@ void PG::proc_replica_log(ObjectStore::Transaction& t, Info &oinfo, Log &olog, M we will send the peer enough log to arrive at the same state. */ - for (map::iterator i = omissing.missing.begin(); + for (map::iterator i = omissing.missing.begin(); i != omissing.missing.end(); ++i) { dout(10) << "Missing sobject: " << i->first << dendl; @@ -287,7 +287,7 @@ void PG::proc_replica_log(ObjectStore::Transaction& t, Info &oinfo, Log &olog, M might_have_unfound.insert(from); search_for_missing(oinfo, &omissing, from); - for (map::iterator i = omissing.missing.begin(); + for (map::iterator i = omissing.missing.begin(); i != omissing.missing.end(); ++i) { dout(10) << "Final Missing sobject: " << i->first << dendl; @@ -395,7 +395,7 @@ void PG::merge_log(ObjectStore::Transaction& t, // If the logs don't overlap, we need both backlogs assert(log.head >= olog.tail || ((log.backlog || log.empty()) && olog.backlog)); - for (map::iterator i = missing.missing.begin(); + for (map::iterator i = missing.missing.begin(); i != missing.missing.end(); ++i) { dout(20) << "Missing sobject: " << i->first << dendl; @@ -405,7 +405,7 @@ void PG::merge_log(ObjectStore::Transaction& t, if (log.head < olog.tail) { // We need to throw away our log and process the backlogs - hash_map old_objects; + hash_map old_objects; old_objects.swap(log.objects); // swap in other log and index @@ -419,7 +419,7 @@ void PG::merge_log(ObjectStore::Transaction& t, if (p->version <= log.head) { dout(10) << "merge_log split point is " << *p << dendl; - hash_map::const_iterator oldobj = old_objects.find(p->soid); + hash_map::const_iterator oldobj = old_objects.find(p->soid); if (oldobj != old_objects.end() && oldobj->second->version == p->version) p++; // move past the split point, if it also exists in our old log... @@ -448,7 +448,7 @@ void PG::merge_log(ObjectStore::Transaction& t, } // Remove objects whose removals we missed - for (hash_map::iterator i = old_objects.begin(); + for (hash_map::iterator i = old_objects.begin(); i != old_objects.end(); ++i) { if (!log.objects.count(i->first)) { @@ -589,10 +589,10 @@ bool PG::search_for_missing(const Info &oinfo, const Missing *omissing, bool found_missing = false; // found items? - for (map::iterator p = missing.missing.begin(); + for (map::iterator p = missing.missing.begin(); p != missing.missing.end(); ++p) { - const sobject_t &soid(p->first); + const hobject_t &soid(p->first); eversion_t need = p->second.need; if (oinfo.last_update < need) { dout(10) << "search_for_missing " << soid << " " << need @@ -620,9 +620,9 @@ bool PG::search_for_missing(const Info &oinfo, const Missing *omissing, dout(10) << "search_for_missing " << soid << " " << need << " is on osd" << fromosd << dendl; - map >::iterator ml = missing_loc.find(soid); + map >::iterator ml = missing_loc.find(soid); if (ml == missing_loc.end()) { - map >::iterator wmo = + map >::iterator wmo = waiting_for_missing_object.find(soid); if (wmo != waiting_for_missing_object.end()) { osd->take_waiters(wmo->second); @@ -704,13 +704,13 @@ bool PG::build_backlog_map(map& omap) unlock(); - vector olist; + vector olist; osd->store->collection_list(coll, olist); - for (vector::iterator it = olist.begin(); + for (vector::iterator it = olist.begin(); it != olist.end(); it++) { - sobject_t poid = *it; + hobject_t poid = *it; Log::Entry e; e.soid = poid; @@ -1080,11 +1080,11 @@ bool PG::all_unfound_are_lost(const OSDMap* osdmap) const /* Mark an object as lost */ void PG::mark_obj_as_lost(ObjectStore::Transaction& t, - const sobject_t &lost_soid) + const hobject_t &lost_soid) { // Wake anyone waiting for this object. Now that it's been marked as lost, // we will just return an error code. - map >::iterator wmo = + map >::iterator wmo = waiting_for_missing_object.find(lost_soid); if (wmo != waiting_for_missing_object.end()) { osd->take_waiters(wmo->second); @@ -1130,10 +1130,10 @@ void PG::mark_all_unfound_as_lost(ObjectStore::Transaction& t) utime_t mtime = ceph_clock_now(g_ceph_context); eversion_t old_last_update = info.last_update; info.last_update.epoch = osd->osdmap->get_epoch(); - map::iterator m = missing.missing.begin(); - map::iterator mend = missing.missing.end(); + map::iterator m = missing.missing.begin(); + map::iterator mend = missing.missing.end(); while (m != mend) { - const sobject_t &soid(m->first); + const hobject_t &soid(m->first); if (missing_loc.find(soid) != missing_loc.end()) { // We only care about unfound objects ++m; @@ -1840,7 +1840,7 @@ void PG::_finish_recovery(Context *c) put(); } -void PG::start_recovery_op(const sobject_t& soid) +void PG::start_recovery_op(const hobject_t& soid) { dout(10) << "start_recovery_op " << soid #ifdef DEBUG_RECOVERY_OIDS @@ -1856,7 +1856,7 @@ void PG::start_recovery_op(const sobject_t& soid) osd->start_recovery_op(this, soid); } -void PG::finish_recovery_op(const sobject_t& soid, bool dequeue) +void PG::finish_recovery_op(const hobject_t& soid, bool dequeue) { dout(10) << "finish_recovery_op " << soid #ifdef DEBUG_RECOVERY_OIDS @@ -1885,7 +1885,7 @@ void PG::clear_recovery_state() log.reset_recovery_pointers(); finish_sync_event = 0; - sobject_t soid; + hobject_t soid; while (recovery_ops_active > 0) { #ifdef DEBUG_RECOVERY_OIDS soid = *recovering_oids.begin(); @@ -2272,7 +2272,7 @@ void PG::read_log(ObjectStore *store) dout(10) << "read_log checking for missing items over interval (" << info.last_complete << "," << info.last_update << "]" << dendl; - set did; + set did; for (list::reverse_iterator i = log.log.rbegin(); i != log.log.rend(); i++) { @@ -2538,9 +2538,9 @@ void PG::adjust_local_snaps() } } -void PG::take_object_waiters(map >& m) +void PG::take_object_waiters(map >& m) { - for (map >::iterator it = m.begin(); + for (map >::iterator it = m.begin(); it != m.end(); it++) osd->take_waiters(it->second); @@ -2654,14 +2654,14 @@ void PG::sub_op_scrub_map(MOSDSubOp *op) /* * pg lock may or may not be held */ -void PG::_scan_list(ScrubMap &map, vector &ls) +void PG::_scan_list(ScrubMap &map, vector &ls) { dout(10) << "_scan_list scanning " << ls.size() << " objects" << dendl; int i = 0; - for (vector::iterator p = ls.begin(); + for (vector::iterator p = ls.begin(); p != ls.end(); p++, i++) { - sobject_t poid = *p; + hobject_t poid = *p; struct stat st; int r = osd->store->stat(coll, poid, &st); @@ -2777,7 +2777,7 @@ void PG::scrub_reserve_replicas() dout(10) << "scrub requesting reserve from osd" << acting[i] << dendl; vector scrub(1); scrub[0].op.op = CEPH_OSD_OP_SCRUB_RESERVE; - sobject_t poid; + hobject_t poid; eversion_t v; osd_reqid_t reqid; MOSDSubOp *subop = new MOSDSubOp(reqid, info.pgid, poid, false, 0, @@ -2793,7 +2793,7 @@ void PG::scrub_unreserve_replicas() dout(10) << "scrub requesting unreserve from osd" << acting[i] << dendl; vector scrub(1); scrub[0].op.op = CEPH_OSD_OP_SCRUB_UNRESERVE; - sobject_t poid; + hobject_t poid; eversion_t v; osd_reqid_t reqid; MOSDSubOp *subop = new MOSDSubOp(reqid, info.pgid, poid, false, 0, @@ -2821,7 +2821,7 @@ void PG::build_scrub_map(ScrubMap &map) osr.flush(); // objects - vector ls; + vector ls; osd->store->collection_list(coll, ls); _scan_list(map, ls); @@ -2857,7 +2857,7 @@ void PG::build_inc_scrub_map(ScrubMap &map, eversion_t v) { map.valid_through = last_update_applied; map.incr_since = v; - vector ls; + vector ls; list::iterator p; if (v == log.tail) { p = log.log.begin(); @@ -2885,7 +2885,7 @@ void PG::build_inc_scrub_map(ScrubMap &map, eversion_t v) osd->store->read(coll_t(), log_oid, 0, 0, map.logbl); } -void PG::repair_object(const sobject_t& soid, ScrubMap::object *po, int bad_peer, int ok_peer) +void PG::repair_object(const hobject_t& soid, ScrubMap::object *po, int bad_peer, int ok_peer) { eversion_t v; bufferlist bv; @@ -2959,7 +2959,7 @@ void PG::replica_scrub(MOSDRepScrub *msg) vector scrub(1); scrub[0].op.op = CEPH_OSD_OP_SCRUB_MAP; - sobject_t poid; + hobject_t poid; eversion_t v; osd_reqid_t reqid; MOSDSubOp *subop = new MOSDSubOp(reqid, info.pgid, poid, false, 0, @@ -3165,14 +3165,14 @@ bool PG::_compare_scrub_objects(ScrubMap::object &auth, } void PG::_compare_scrubmaps(const map &maps, - map > &missing, - map > &inconsistent, - map &authoritative, + map > &missing, + map > &inconsistent, + map &authoritative, ostream &errorstream) { - map::const_iterator i; + map::const_iterator i; map::const_iterator j; - set master_set; + set master_set; // Construct master set for (j = maps.begin(); j != maps.end(); j++) { @@ -3182,7 +3182,7 @@ void PG::_compare_scrubmaps(const map &maps, } // Check maps against master set and each other - for (set::const_iterator k = master_set.begin(); + for (set::const_iterator k = master_set.begin(); k != master_set.end(); k++) { map::const_iterator auth = maps.end(); @@ -3255,11 +3255,11 @@ void PG::scrub_finalize() { stringstream ss; // Maps from objects with erros to missing/inconsistent peers - map > missing; - map > inconsistent; + map > missing; + map > inconsistent; // Map from object with errors to good peer - map authoritative; + map authoritative; map maps; dout(2) << "scrub osd" << acting[0] << " has " @@ -3281,7 +3281,7 @@ void PG::scrub_finalize() { state_set(PG_STATE_INCONSISTENT); if (repair) { state_clear(PG_STATE_CLEAN); - for (map::iterator i = authoritative.begin(); + for (map::iterator i = authoritative.begin(); i != authoritative.end(); i++) { set::iterator j; @@ -3709,14 +3709,14 @@ void PG::Missing::swap(Missing& o) rmissing.swap(o.rmissing); } -bool PG::Missing::is_missing(const sobject_t& oid) const +bool PG::Missing::is_missing(const hobject_t& oid) const { return (missing.find(oid) != missing.end()); } -bool PG::Missing::is_missing(const sobject_t& oid, eversion_t v) const +bool PG::Missing::is_missing(const hobject_t& oid, eversion_t v) const { - map::const_iterator m = missing.find(oid); + map::const_iterator m = missing.find(oid); if (m == missing.end()) return false; const Missing::item &item(m->second); @@ -3725,9 +3725,9 @@ bool PG::Missing::is_missing(const sobject_t& oid, eversion_t v) const return true; } -eversion_t PG::Missing::have_old(const sobject_t& oid) const +eversion_t PG::Missing::have_old(const hobject_t& oid) const { - map::const_iterator m = missing.find(oid); + map::const_iterator m = missing.find(oid); if (m == missing.end()) return eversion_t(); const Missing::item &item(m->second); @@ -3766,7 +3766,7 @@ void PG::Missing::add_next_event(Log::Entry& e, const Info &info) rm(e.soid, e.version); } -void PG::Missing::revise_need(sobject_t oid, eversion_t need) +void PG::Missing::revise_need(hobject_t oid, eversion_t need) { if (missing.count(oid)) { rmissing.erase(missing[oid].need.version); @@ -3777,13 +3777,13 @@ void PG::Missing::revise_need(sobject_t oid, eversion_t need) rmissing[need.version] = oid; } -void PG::Missing::add(const sobject_t& oid, eversion_t need, eversion_t have) +void PG::Missing::add(const hobject_t& oid, eversion_t need, eversion_t have) { missing[oid] = item(need, have); rmissing[need.version] = oid; } -void PG::Missing::rm(const sobject_t& oid, eversion_t v) +void PG::Missing::rm(const hobject_t& oid, eversion_t v) { if (missing.count(oid) && missing[oid].need <= v) { rmissing.erase(missing[oid].need.version); @@ -3791,7 +3791,7 @@ void PG::Missing::rm(const sobject_t& oid, eversion_t v) } } -void PG::Missing::got(const sobject_t& oid, eversion_t v) +void PG::Missing::got(const hobject_t& oid, eversion_t v) { assert(missing.count(oid)); assert(missing[oid].need <= v); @@ -3799,7 +3799,7 @@ void PG::Missing::got(const sobject_t& oid, eversion_t v) missing.erase(oid); } -void PG::Missing::got(const std::map::iterator &m) +void PG::Missing::got(const std::map::iterator &m) { rmissing.erase(m->second.need.version); missing.erase(m); diff --git a/src/osd/PG.h b/src/osd/PG.h index 6d75bd966dd5c..39531f243d018 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -365,14 +365,14 @@ public: }; __s32 op; - sobject_t soid; + hobject_t soid; eversion_t version, prior_version; osd_reqid_t reqid; // caller+tid to uniquely identify request utime_t mtime; // this is the _user_ mtime, mind you bufferlist snaps; // only for clone entries Entry() : op(0) {} - Entry(int _op, const sobject_t& _soid, + Entry(int _op, const hobject_t& _soid, const eversion_t& v, const eversion_t& pv, const osd_reqid_t& rid, const utime_t& mt) : op(_op), soid(_soid), version(v), @@ -495,7 +495,7 @@ public: * plus some methods to manipulate it all. */ struct IndexedLog : public Log { - hash_map objects; // ptrs into log. be careful! + hash_map objects; // ptrs into log. be careful! hash_map caller_ops; // recovery pointers @@ -515,7 +515,7 @@ public: last_requested = 0; } - bool logged_object(const sobject_t& oid) const { + bool logged_object(const hobject_t& oid) const { return objects.count(oid); } bool logged_req(const osd_reqid_t &r) const { @@ -567,11 +567,11 @@ public: // accessors - Entry *is_updated(const sobject_t& oid) { + Entry *is_updated(const hobject_t& oid) { if (objects.count(oid) && objects[oid]->is_update()) return objects[oid]; return 0; } - Entry *is_deleted(const sobject_t& oid) { + Entry *is_deleted(const hobject_t& oid) { if (objects.count(oid) && objects[oid]->is_delete()) return objects[oid]; return 0; } @@ -658,21 +658,21 @@ public: }; WRITE_CLASS_ENCODER(item) - map missing; // oid -> (need v, have v) - map rmissing; // v -> oid + map missing; // oid -> (need v, have v) + map rmissing; // v -> oid unsigned int num_missing() const; bool have_missing() const; void swap(Missing& o); - bool is_missing(const sobject_t& oid) const; - bool is_missing(const sobject_t& oid, eversion_t v) const; - eversion_t have_old(const sobject_t& oid) const; + bool is_missing(const hobject_t& oid) const; + bool is_missing(const hobject_t& oid, eversion_t v) const; + eversion_t have_old(const hobject_t& oid) const; void add_next_event(Log::Entry& e, const Info &info); - void revise_need(sobject_t oid, eversion_t need); - void add(const sobject_t& oid, eversion_t need, eversion_t have); - void rm(const sobject_t& oid, eversion_t v); - void got(const sobject_t& oid, eversion_t v); - void got(const std::map::iterator &m); + void revise_need(hobject_t oid, eversion_t need); + void add(const hobject_t& oid, eversion_t need, eversion_t have); + void rm(const hobject_t& oid, eversion_t v); + void got(const hobject_t& oid, eversion_t v); + void got(const std::map::iterator &m); void encode(bufferlist &bl) const { __u8 struct_v = 1; @@ -685,7 +685,7 @@ public: ::decode(struct_v, bl); ::decode(missing, bl); - for (map::iterator it = missing.begin(); + for (map::iterator it = missing.begin(); it != missing.end(); ++it) rmissing[it->second.need.version] = it->first; @@ -781,11 +781,11 @@ public: Info info; const coll_t coll; IndexedLog log; - sobject_t log_oid; - sobject_t biginfo_oid; + hobject_t log_oid; + hobject_t biginfo_oid; OndiskLog ondisklog; Missing missing; - map > missing_loc; + map > missing_loc; interval_set snap_collections; map past_intervals; @@ -797,7 +797,7 @@ public: xlist::item recovery_item, backlog_item, scrub_item, scrub_finalize_item, snap_trim_item, remove_item, stat_queue_item; int recovery_ops_active; #ifdef DEBUG_RECOVERY_OIDS - set recovering_oids; + set recovering_oids; #endif epoch_t generate_backlog_epoch; // epoch we decided to build a backlog. @@ -1303,12 +1303,12 @@ protected: // pg waiters list waiting_for_active; - map > waiting_for_missing_object, + map > waiting_for_missing_object, waiting_for_degraded_object; map > waiting_for_ondisk; map replay_queue; - void take_object_waiters(map >& m); + void take_object_waiters(map >& m); bool block_if_wrlocked(MOSDOp* op, object_info_t& oi); @@ -1351,7 +1351,7 @@ public: bool all_unfound_are_lost(const OSDMap* osdmap) const; void mark_obj_as_lost(ObjectStore::Transaction& t, - const sobject_t &lost_soid); + const hobject_t &lost_soid); void mark_all_unfound_as_lost(ObjectStore::Transaction& t); bool calc_min_last_complete_ondisk() { @@ -1437,8 +1437,8 @@ public: virtual void _clear_recovery_state() = 0; void defer_recovery(); virtual void check_recovery_op_pulls(const OSDMap *newmap) = 0; - void start_recovery_op(const sobject_t& soid); - void finish_recovery_op(const sobject_t& soid, bool dequeue=false); + void start_recovery_op(const hobject_t& soid); + void finish_recovery_op(const hobject_t& soid, bool dequeue=false); loff_t get_log_write_pos() { return 0; @@ -1457,20 +1457,20 @@ public: ScrubMap primary_scrubmap; MOSDRepScrub *active_rep_scrub; - void repair_object(const sobject_t& soid, ScrubMap::object *po, int bad_peer, int ok_peer); + void repair_object(const hobject_t& soid, ScrubMap::object *po, int bad_peer, int ok_peer); bool _compare_scrub_objects(ScrubMap::object &auth, ScrubMap::object &candidate, ostream &errorstream); void _compare_scrubmaps(const map &maps, - map > &missing, - map > &inconsistent, - map &authoritative, + map > &missing, + map > &inconsistent, + map &authoritative, ostream &errorstream); void scrub(); void scrub_finalize(); void scrub_clear_state(); bool scrub_gather_replica_maps(); - void _scan_list(ScrubMap &map, vector &ls); + void _scan_list(ScrubMap &map, vector &ls); void _request_scrub_map(int replica, eversion_t version); void build_scrub_map(ScrubMap &map); void build_inc_scrub_map(ScrubMap &map, eversion_t v); @@ -1489,7 +1489,7 @@ public: void sub_op_scrub_stop(class MOSDSubOp *op); public: - PG(OSD *o, PGPool *_pool, pg_t p, const sobject_t& loid, const sobject_t& ioid) : + PG(OSD *o, PGPool *_pool, pg_t p, const hobject_t& loid, const hobject_t& ioid) : osd(o), pool(_pool), _lock("PG::_lock"), ref(0), deleting(false), dirty_info(false), dirty_log(false), @@ -1636,11 +1636,11 @@ public: virtual bool same_for_rep_modify_since(epoch_t e) = 0; virtual bool is_write_in_progress() = 0; - virtual bool is_missing_object(const sobject_t& oid) = 0; - virtual void wait_for_missing_object(const sobject_t& oid, Message *op) = 0; + virtual bool is_missing_object(const hobject_t& oid) = 0; + virtual void wait_for_missing_object(const hobject_t& oid, Message *op) = 0; - virtual bool is_degraded_object(const sobject_t& oid) = 0; - virtual void wait_for_degraded_object(const sobject_t& oid, Message *op) = 0; + virtual bool is_degraded_object(const hobject_t& oid) = 0; + virtual void wait_for_degraded_object(const hobject_t& oid, Message *op) = 0; virtual void on_osd_failure(int osd) = 0; virtual void on_role_change() = 0; diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 06c53e61cb820..2a64ed71500be 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -89,21 +89,21 @@ bool ReplicatedPG::same_for_rep_modify_since(epoch_t e) // ==================== // missing objects -bool ReplicatedPG::is_missing_object(const sobject_t& soid) +bool ReplicatedPG::is_missing_object(const hobject_t& soid) { return missing.missing.count(soid); } -void ReplicatedPG::wait_for_missing_object(const sobject_t& soid, Message *m) +void ReplicatedPG::wait_for_missing_object(const hobject_t& soid, Message *m) { assert(is_missing_object(soid)); // we don't have it (yet). - map::const_iterator g = missing.missing.find(soid); + map::const_iterator g = missing.missing.find(soid); assert(g != missing.missing.end()); const eversion_t &v(g->second.need); - map::const_iterator p = pulling.find(soid); + map::const_iterator p = pulling.find(soid); if (p != pulling.end()) { dout(7) << "missing " << soid << " v " << v << ", already pulling." << dendl; } @@ -117,7 +117,7 @@ void ReplicatedPG::wait_for_missing_object(const sobject_t& soid, Message *m) waiting_for_missing_object[soid].push_back(m); } -bool ReplicatedPG::is_degraded_object(const sobject_t& soid) +bool ReplicatedPG::is_degraded_object(const hobject_t& soid) { if (missing.missing.count(soid)) return true; @@ -130,7 +130,7 @@ bool ReplicatedPG::is_degraded_object(const sobject_t& soid) return false; } -void ReplicatedPG::wait_for_degraded_object(const sobject_t& soid, Message *m) +void ReplicatedPG::wait_for_degraded_object(const hobject_t& soid, Message *m) { assert(is_degraded_object(soid)); @@ -191,7 +191,7 @@ bool PGLSPlainFilter::filter(bufferlist& xattr_data, bufferlist& outdata) return true; } -bool ReplicatedPG::pgls_filter(PGLSFilter *filter, sobject_t& sobj, bufferlist& outdata) +bool ReplicatedPG::pgls_filter(PGLSFilter *filter, hobject_t& sobj, bufferlist& outdata) { bufferlist bl; @@ -259,7 +259,7 @@ void ReplicatedPG::do_pg_op(MOSDOp *op) } else { dout(10) << " pgls pg=" << op->get_pg() << " count " << p->op.pgls.count << dendl; // read into a buffer - vector sentries; + vector sentries; PGLSResponse response; response.handle = (collection_list_handle_t)(uint64_t)(p->op.pgls.cookie); @@ -277,7 +277,7 @@ void ReplicatedPG::do_pg_op(MOSDOp *op) // it's an offset into the missing set version_t v = response.handle; dout(10) << " handle low/missing " << v << dendl; - map::iterator mp = missing.rmissing.lower_bound(v); + map::iterator mp = missing.rmissing.lower_bound(v); result = 0; while (sentries.size() < p->op.pgls.count) { if (mp == missing.rmissing.end()) { @@ -302,7 +302,7 @@ void ReplicatedPG::do_pg_op(MOSDOp *op) } if (result == 0) { - vector::iterator iter; + vector::iterator iter; for (iter = sentries.begin(); iter != sentries.end(); ++iter) { bool keep = true; // skip snapdir objects @@ -379,7 +379,7 @@ void ReplicatedPG::calc_trim_to() } } -ReplicatedPG::ReplicatedPG(OSD *o, PGPool *_pool, pg_t p, const sobject_t& oid, const sobject_t& ioid) : +ReplicatedPG::ReplicatedPG(OSD *o, PGPool *_pool, pg_t p, const hobject_t& oid, const hobject_t& ioid) : PG(o, _pool, p, oid, ioid), snap_trimmer_machine(this) { snap_trimmer_machine.initiate(); @@ -417,7 +417,7 @@ void ReplicatedPG::do_op(MOSDOp *op) if (is_primary() || (!(op->get_rmw_flags() & CEPH_OSD_FLAG_LOCALIZE_READS))) { // missing the specific snap we need; requeue and wait. assert(!can_create); // only happens on a read - sobject_t soid(op->get_oid(), snapid); + hobject_t soid(op->get_oid(), snapid); wait_for_missing_object(soid, op); return; } @@ -474,7 +474,7 @@ void ReplicatedPG::do_op(MOSDOp *op) dout(10) << "do_op mode now " << mode << dendl; // src_oids - map src_obc; + map src_obc; for (vector::iterator p = op->ops.begin(); p != op->ops.end(); p++) { OSDOp& osd_op = *p; if (osd_op.soid.oid.name.length()) { @@ -485,7 +485,7 @@ void ReplicatedPG::do_op(MOSDOp *op) &sobc, false, &ssnapid); if (r == -EAGAIN) { // missing the specific snap we need; requeue and wait. - sobject_t soid(osd_op.soid.oid, ssnapid); + hobject_t soid(osd_op.soid.oid, ssnapid); wait_for_missing_object(soid, op); } else if (r) { osd->reply_op_error(op, r); @@ -514,7 +514,7 @@ void ReplicatedPG::do_op(MOSDOp *op) return; } - const sobject_t& soid = obc->obs.oi.soid; + const hobject_t& soid = obc->obs.oi.soid; OpContext *ctx = new OpContext(op, op->get_reqid(), op->ops, &obc->obs, obc->ssc, this); @@ -777,7 +777,7 @@ void ReplicatedPG::do_sub_op_reply(MOSDSubOpReply *r) * obs_to_trim */ bool ReplicatedPG::get_obs_to_trim(snapid_t &snap_to_trim, coll_t &col_to_trim, - vector &obs_to_trim) + vector &obs_to_trim) { assert_locked(); obs_to_trim.clear(); @@ -806,7 +806,7 @@ bool ReplicatedPG::get_obs_to_trim(snapid_t &snap_to_trim, return true; } -ReplicatedPG::RepGather *ReplicatedPG::trim_object(const sobject_t &coid, +ReplicatedPG::RepGather *ReplicatedPG::trim_object(const hobject_t &coid, const snapid_t &sn) { // load clone info @@ -921,7 +921,7 @@ ReplicatedPG::RepGather *ReplicatedPG::trim_object(const sobject_t &coid, // save head snapset dout(10) << coid << " new snapset " << snapset << dendl; - sobject_t snapoid(coid.oid, snapset.head_exists ? CEPH_NOSNAP:CEPH_SNAPDIR); + hobject_t snapoid(coid.oid, snapset.head_exists ? CEPH_NOSNAP:CEPH_SNAPDIR); ctx->snapset_obc = get_object_context(snapoid, coi.oloc, false); assert(ctx->snapset_obc->registered); if (snapset.clones.empty() && !snapset.head_exists) { @@ -1126,7 +1126,7 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector& ops, bool maybe_created = false; - const sobject_t& soid = oi.soid; + const hobject_t& soid = oi.soid; ObjectStore::Transaction& t = ctx->op_t; @@ -2052,7 +2052,7 @@ inline void ReplicatedPG::_delete_head(OpContext *ctx) SnapSet& snapset = ctx->new_snapset; ObjectState& obs = ctx->new_obs; object_info_t& oi = obs.oi; - const sobject_t& soid = oi.soid; + const hobject_t& soid = oi.soid; ObjectStore::Transaction& t = ctx->op_t; if (obs.exists) @@ -2083,7 +2083,7 @@ int ReplicatedPG::_rollback_to(OpContext *ctx, ceph_osd_op& op) SnapSet& snapset = ctx->new_snapset; ObjectState& obs = ctx->new_obs; object_info_t& oi = obs.oi; - const sobject_t& soid = oi.soid; + const hobject_t& soid = oi.soid; ObjectStore::Transaction& t = ctx->op_t; snapid_t snapid = (uint64_t)op.snap.snapid; snapid_t cloneid = 0; @@ -2103,7 +2103,7 @@ int ReplicatedPG::_rollback_to(OpContext *ctx, ceph_osd_op& op) /* a different problem, like degraded pool * with not-yet-restored object. We shouldn't have been able * to get here; recovery should have completed first! */ - sobject_t rollback_target(soid.oid, cloneid); + hobject_t rollback_target(soid.oid, cloneid); assert(is_missing_object(rollback_target)); dout(20) << "_rollback_to attempted to roll back to a missing object " << rollback_target << " (requested snapid: ) " << snapid << dendl; @@ -2113,7 +2113,7 @@ int ReplicatedPG::_rollback_to(OpContext *ctx, ceph_osd_op& op) assert(0); } } else { //we got our context, let's use it to do the rollback! - sobject_t& rollback_to_sobject = rollback_to->obs.oi.soid; + hobject_t& rollback_to_sobject = rollback_to->obs.oi.soid; if (is_degraded_object(rollback_to_sobject)) { dout(20) << "_rollback_to attempted to roll back to a degraded object " << rollback_to_sobject << " (requested snapid: ) " << snapid << dendl; @@ -2177,7 +2177,7 @@ int ReplicatedPG::_rollback_to(OpContext *ctx, ceph_osd_op& op) } void ReplicatedPG::_make_clone(ObjectStore::Transaction& t, - const sobject_t& head, const sobject_t& coid, + const hobject_t& head, const hobject_t& coid, object_info_t *poi) { bufferlist bv; @@ -2194,7 +2194,7 @@ void ReplicatedPG::_make_clone(ObjectStore::Transaction& t, void ReplicatedPG::make_writeable(OpContext *ctx) { - const sobject_t& soid = ctx->obs->oi.soid; + const hobject_t& soid = ctx->obs->oi.soid; SnapContext& snapc = ctx->snapc; /* ObjectState& obs = ctx->new_obs; @@ -2218,7 +2218,7 @@ void ReplicatedPG::make_writeable(OpContext *ctx) snapc.snaps.size() && // there are snaps snapc.snaps[0] > ctx->new_snapset.seq) { // existing object is old // clone - sobject_t coid = soid; + hobject_t coid = soid; coid.snap = snapc.seq; unsigned l; @@ -2331,7 +2331,7 @@ void ReplicatedPG::do_osd_op_effects(OpContext *ctx) OSD::Session *session = (OSD::Session *)ctx->op->get_connection()->get_priv(); ObjectContext *obc = ctx->obc; object_info_t& oi = ctx->new_obs.oi; - sobject_t& soid = oi.soid; + hobject_t& soid = oi.soid; entity_name_t entity = ctx->reqid.name; dout(10) << "do_osd_op_effects applying watch/notify effects on session " << session << dendl; @@ -2462,7 +2462,7 @@ int ReplicatedPG::prepare_transaction(OpContext *ctx) { assert(!ctx->ops.empty()); - const sobject_t& soid = ctx->obs->oi.soid; + const hobject_t& soid = ctx->obs->oi.soid; // we'll need this to log eversion_t old_version = ctx->obs->oi.version; @@ -2540,7 +2540,7 @@ int ReplicatedPG::prepare_transaction(OpContext *ctx) ctx->op_t.setattr(coll, soid, SS_ATTR, bss); if (!head_existed) { // if we logically recreated the head, remove old _snapdir object - sobject_t snapoid(soid.oid, CEPH_SNAPDIR); + hobject_t snapoid(soid.oid, CEPH_SNAPDIR); ctx->snapset_obc = get_object_context(snapoid, ctx->new_obs.oi.oloc, false); if (ctx->snapset_obc && ctx->snapset_obc->obs.exists) { @@ -2557,7 +2557,7 @@ int ReplicatedPG::prepare_transaction(OpContext *ctx) } } else if (ctx->new_snapset.clones.size()) { // save snapset on _snap - sobject_t snapoid(soid.oid, CEPH_SNAPDIR); + hobject_t snapoid(soid.oid, CEPH_SNAPDIR); dout(10) << " final snapset " << ctx->new_snapset << " in " << snapoid << dendl; ctx->at_version.version++; @@ -2842,7 +2842,7 @@ void ReplicatedPG::issue_repop(RepGather *repop, utime_t now, eversion_t old_last_update, bool old_exists, uint64_t old_size, eversion_t old_version) { OpContext *ctx = repop->ctx; - const sobject_t& soid = ctx->obs->oi.soid; + const hobject_t& soid = ctx->obs->oi.soid; MOSDOp *op = (MOSDOp *)ctx->op; dout(7) << "issue_repop rep_tid " << repop->rep_tid @@ -2980,11 +2980,11 @@ void ReplicatedPG::repop_ack(RepGather *repop, int result, int ack_type, // ------------------------------------------------------- -ReplicatedPG::ObjectContext *ReplicatedPG::get_object_context(const sobject_t& soid, +ReplicatedPG::ObjectContext *ReplicatedPG::get_object_context(const hobject_t& soid, const object_locator_t& oloc, bool can_create) { - map::iterator p = object_contexts.find(soid); + map::iterator p = object_contexts.find(soid); ObjectContext *obc; if (p != object_contexts.end()) { obc = p->second; @@ -3052,7 +3052,7 @@ int ReplicatedPG::find_object_context(const object_t& oid, const object_locator_ snapid_t *psnapid) { // want the head? - sobject_t head(oid, CEPH_NOSNAP); + hobject_t head(oid, CEPH_NOSNAP); if (snapid == CEPH_NOSNAP) { ObjectContext *obc = get_object_context(head, oloc, can_create); if (!obc) @@ -3109,7 +3109,7 @@ int ReplicatedPG::find_object_context(const object_t& oid, const object_locator_ put_snapset_context(ssc); return -ENOENT; } - sobject_t soid(oid, ssc->snapset.clones[k]); + hobject_t soid(oid, ssc->snapset.clones[k]); put_snapset_context(ssc); // we're done with ssc ssc = 0; @@ -3166,9 +3166,9 @@ void ReplicatedPG::put_object_context(ObjectContext *obc) } } -void ReplicatedPG::put_object_contexts(map& obcv) +void ReplicatedPG::put_object_contexts(map& obcv) { - for (map::iterator p = obcv.begin(); p != obcv.end(); ++p) + for (map::iterator p = obcv.begin(); p != obcv.end(); ++p) put_object_context(p->second); obcv.clear(); } @@ -3181,11 +3181,11 @@ ReplicatedPG::SnapSetContext *ReplicatedPG::get_snapset_context(const object_t& ssc = p->second; } else { bufferlist bv; - sobject_t head(oid, CEPH_NOSNAP); + hobject_t head(oid, CEPH_NOSNAP); int r = osd->store->getattr(coll, head, SS_ATTR, bv); if (r < 0) { // try _snapset - sobject_t snapdir(oid, CEPH_SNAPDIR); + hobject_t snapdir(oid, CEPH_SNAPDIR); r = osd->store->getattr(coll, snapdir, SS_ATTR, bv); if (r < 0 && !can_create) return NULL; @@ -3221,7 +3221,7 @@ void ReplicatedPG::put_snapset_context(SnapSetContext *ssc) void ReplicatedPG::sub_op_modify(MOSDSubOp *op) { - const sobject_t& soid = op->poid; + const hobject_t& soid = op->poid; const char *opname; if (op->noop) @@ -3415,10 +3415,10 @@ void ReplicatedPG::sub_op_modify_reply(MOSDSubOpReply *r) // =========================================================== -void ReplicatedPG::calc_head_subsets(SnapSet& snapset, const sobject_t& head, +void ReplicatedPG::calc_head_subsets(SnapSet& snapset, const hobject_t& head, Missing& missing, interval_set& data_subset, - map >& clone_subsets) + map >& clone_subsets) { dout(10) << "calc_head_subsets " << head << " clone_overlap " << snapset.clone_overlap << dendl; @@ -3432,7 +3432,7 @@ void ReplicatedPG::calc_head_subsets(SnapSet& snapset, const sobject_t& head, prev.insert(0, st.st_size); for (int j=snapset.clones.size()-1; j>=0; j--) { - sobject_t c = head; + hobject_t c = head; c.snap = snapset.clones[j]; prev.intersection_of(snapset.clone_overlap[snapset.clones[j]]); if (!missing.is_missing(c)) { @@ -3456,10 +3456,10 @@ void ReplicatedPG::calc_head_subsets(SnapSet& snapset, const sobject_t& head, << " clone_subsets " << clone_subsets << dendl; } -void ReplicatedPG::calc_clone_subsets(SnapSet& snapset, const sobject_t& soid, +void ReplicatedPG::calc_clone_subsets(SnapSet& snapset, const hobject_t& soid, Missing& missing, interval_set& data_subset, - map >& clone_subsets) + map >& clone_subsets) { dout(10) << "calc_clone_subsets " << soid << " clone_overlap " << snapset.clone_overlap << dendl; @@ -3477,7 +3477,7 @@ void ReplicatedPG::calc_clone_subsets(SnapSet& snapset, const sobject_t& soid, if (size) prev.insert(0, size); for (int j=i-1; j>=0; j--) { - sobject_t c = soid; + hobject_t c = soid; c.snap = snapset.clones[j]; prev.intersection_of(snapset.clone_overlap[snapset.clones[j]]); if (!missing.is_missing(c)) { @@ -3496,7 +3496,7 @@ void ReplicatedPG::calc_clone_subsets(SnapSet& snapset, const sobject_t& soid, if (size) next.insert(0, size); for (unsigned j=i+1; j >::iterator q = missing_loc.find(soid); + map >::iterator q = missing_loc.find(soid); if (q != missing_loc.end()) { for (set::iterator p = q->second.begin(); p != q->second.end(); @@ -3561,14 +3561,14 @@ int ReplicatedPG::pull(const sobject_t& soid) << " from osd" << fromosd << dendl; - map > clone_subsets; + map > clone_subsets; interval_set data_subset; bool need_size = false; // is this a snapped object? if so, consult the snapset.. we may not need the entire object! if (soid.snap && soid.snap < CEPH_NOSNAP) { // do we have the head and/or snapdir? - sobject_t head = soid; + hobject_t head = soid; head.snap = CEPH_NOSNAP; if (missing.is_missing(head)) { if (pulling.count(head)) { @@ -3630,7 +3630,7 @@ int ReplicatedPG::pull(const sobject_t& soid) return PULL_YES; } -void ReplicatedPG::send_pull_op(const sobject_t& soid, eversion_t v, bool first, +void ReplicatedPG::send_pull_op(const hobject_t& soid, eversion_t v, bool first, const interval_set& data_subset, int fromosd) { // send op @@ -3663,19 +3663,19 @@ void ReplicatedPG::send_pull_op(const sobject_t& soid, eversion_t v, bool first, * intelligently push an object to a replica. make use of existing * clones/heads and dup data ranges where possible. */ -void ReplicatedPG::push_to_replica(ObjectContext *obc, const sobject_t& soid, int peer) +void ReplicatedPG::push_to_replica(ObjectContext *obc, const hobject_t& soid, int peer) { const object_info_t& oi = obc->obs.oi; uint64_t size = obc->obs.oi.size; dout(10) << "push_to_replica " << soid << " v" << oi.version << " size " << size << " to osd" << peer << dendl; - map > clone_subsets; + map > clone_subsets; interval_set data_subset; // are we doing a clone on the replica? if (soid.snap && soid.snap < CEPH_NOSNAP) { - sobject_t head = soid; + hobject_t head = soid; head.snap = CEPH_NOSNAP; if (peer_missing[peer].is_missing(head) && peer_missing[peer].have_old(head) == oi.prior_version) { @@ -3683,7 +3683,7 @@ void ReplicatedPG::push_to_replica(ObjectContext *obc, const sobject_t& soid, in << " v" << oi.prior_version << ", pushing " << soid << " attrs as a clone op" << dendl; interval_set data_subset; - map > clone_subsets; + map > clone_subsets; if (size) clone_subsets[head].insert(0, size); push_start(soid, peer, size, oi.version, data_subset, clone_subsets); @@ -3696,7 +3696,7 @@ void ReplicatedPG::push_to_replica(ObjectContext *obc, const sobject_t& soid, in dout(15) << "push_to_replica missing head " << head << ", pushing raw clone" << dendl; return push_start(soid, peer); } - sobject_t snapdir = head; + hobject_t snapdir = head; snapdir.snap = CEPH_SNAPDIR; if (missing.is_missing(snapdir)) { dout(15) << "push_to_replica missing snapdir " << snapdir << ", pushing raw clone" << dendl; @@ -3720,7 +3720,7 @@ void ReplicatedPG::push_to_replica(ObjectContext *obc, const sobject_t& soid, in push_start(soid, peer, size, oi.version, data_subset, clone_subsets); } -void ReplicatedPG::push_start(const sobject_t& soid, int peer) +void ReplicatedPG::push_start(const hobject_t& soid, int peer) { struct stat st; int r = osd->store->stat(coll, soid, &st); @@ -3732,16 +3732,16 @@ void ReplicatedPG::push_start(const sobject_t& soid, int peer) object_info_t oi(bl); interval_set data_subset; - map > clone_subsets; + map > clone_subsets; data_subset.insert(0, size); push_start(soid, peer, size, oi.version, data_subset, clone_subsets); } -void ReplicatedPG::push_start(const sobject_t& soid, int peer, +void ReplicatedPG::push_start(const hobject_t& soid, int peer, uint64_t size, eversion_t version, interval_set &data_subset, - map >& clone_subsets) + map >& clone_subsets) { // take note. push_info_t *pi = &pushing[soid][peer]; @@ -3763,10 +3763,10 @@ void ReplicatedPG::push_start(const sobject_t& soid, int peer, * push - send object to a peer */ -int ReplicatedPG::send_push_op(const sobject_t& soid, eversion_t version, int peer, +int ReplicatedPG::send_push_op(const hobject_t& soid, eversion_t version, int peer, uint64_t size, bool first, bool complete, interval_set &data_subset, - map >& clone_subsets) + map >& clone_subsets) { // read data+attrs bufferlist bl; @@ -3830,7 +3830,7 @@ int ReplicatedPG::send_push_op(const sobject_t& soid, eversion_t version, int pe return 0; } -void ReplicatedPG::send_push_op_blank(const sobject_t& soid, int peer) +void ReplicatedPG::send_push_op_blank(const hobject_t& soid, int peer) { // send a blank push back to the primary osd_reqid_t rid; @@ -3848,7 +3848,7 @@ void ReplicatedPG::sub_op_push_reply(MOSDSubOpReply *reply) dout(10) << "sub_op_push_reply from " << reply->get_source() << " " << *reply << dendl; int peer = reply->get_source().num(); - const sobject_t& soid = reply->get_poid(); + const hobject_t& soid = reply->get_poid(); if (pushing.count(soid) == 0) { dout(10) << "huh, i wasn't pushing " << soid << " to osd" << peer @@ -3906,7 +3906,7 @@ void ReplicatedPG::sub_op_push_reply(MOSDSubOpReply *reply) */ void ReplicatedPG::sub_op_pull(MOSDSubOp *op) { - const sobject_t soid = op->poid; + const hobject_t soid = op->poid; dout(7) << "op_pull " << soid << " v " << op->version << " from " << op->get_source() @@ -3991,7 +3991,7 @@ void ReplicatedPG::_applied_pushed_object(ObjectStore::Transaction *t, ObjectCon */ void ReplicatedPG::sub_op_push(MOSDSubOp *op) { - const sobject_t& soid = op->poid; + const hobject_t& soid = op->poid; eversion_t v = op->version; OSDOp& push = op->ops[0]; @@ -4012,7 +4012,7 @@ void ReplicatedPG::sub_op_push(MOSDSubOp *op) } interval_set data_subset; - map > clone_subsets; + map > clone_subsets; bufferlist data; op->claim_data(data); @@ -4161,7 +4161,7 @@ void ReplicatedPG::sub_op_push(MOSDSubOp *op) } // clone bits - for (map >::const_iterator p = clone_subsets.begin(); + for (map >::const_iterator p = clone_subsets.begin(); p != clone_subsets.end(); ++p) { @@ -4301,7 +4301,7 @@ void ReplicatedPG::sub_op_push(MOSDSubOp *op) waiting_for_missing_object.erase(soid); } else { dout(20) << " no waiters on " << soid << dendl; - /*for (hash_map >::iterator p = waiting_for_missing_object.begin(); + /*for (hash_map >::iterator p = waiting_for_missing_object.begin(); p != waiting_for_missing_object.end(); p++) dout(20) << " " << p->first << dendl; @@ -4314,9 +4314,9 @@ void ReplicatedPG::sub_op_push(MOSDSubOp *op) void ReplicatedPG::_failed_push(MOSDSubOp *op) { - const sobject_t& soid = op->poid; + const hobject_t& soid = op->poid; int from = op->get_source().num(); - map >::iterator p = missing_loc.find(soid); + map >::iterator p = missing_loc.find(soid); if (p != missing_loc.end()) { dout(0) << "_failed_push " << soid << " from osd" << from << ", reps on " << p->second << dendl; @@ -4436,7 +4436,7 @@ void ReplicatedPG::_clear_recovery_state() void ReplicatedPG::check_recovery_op_pulls(const OSDMap *osdmap) { - for (map >::iterator j = pull_from_peer.begin(); + for (map >::iterator j = pull_from_peer.begin(); j != pull_from_peer.end(); ) { if (osdmap->is_up(j->first)) { @@ -4446,7 +4446,7 @@ void ReplicatedPG::check_recovery_op_pulls(const OSDMap *osdmap) dout(10) << "Reseting pulls from osd" << j->first << ", osdmap has it marked down" << dendl; - for (set::iterator i = j->second.begin(); + for (set::iterator i = j->second.begin(); i != j->second.end(); ++i) { assert(pulling.count(*i) == 1); @@ -4521,9 +4521,9 @@ int ReplicatedPG::recover_primary(int max) int started = 0; int skipped = 0; - map::iterator p = missing.rmissing.lower_bound(log.last_requested); + map::iterator p = missing.rmissing.lower_bound(log.last_requested); while (p != missing.rmissing.end()) { - sobject_t soid; + hobject_t soid; version_t v = p->first; if (log.objects.count(p->second)) { @@ -4537,7 +4537,7 @@ int ReplicatedPG::recover_primary(int max) Missing::item& item = missing.missing[p->second]; p++; - sobject_t head = soid; + hobject_t head = soid; head.snap = CEPH_NOSNAP; bool unfound = (missing_loc.find(soid) == missing_loc.end()); @@ -4616,7 +4616,7 @@ int ReplicatedPG::recover_primary(int max) return started; } -int ReplicatedPG::recover_object_replicas(const sobject_t& soid, eversion_t v) +int ReplicatedPG::recover_object_replicas(const hobject_t& soid, eversion_t v) { dout(10) << "recover_object_replicas " << soid << dendl; @@ -4680,10 +4680,10 @@ int ReplicatedPG::recover_replicas(int max) // oldest first! const Missing &m(pm->second); - for (map::const_iterator p = m.rmissing.begin(); + for (map::const_iterator p = m.rmissing.begin(); p != m.rmissing.end() && started < max; ++p) { - const sobject_t soid(p->second); + const hobject_t soid(p->second); if (pushing.count(soid)) { dout(10) << __func__ << ": already pushing " << soid << dendl; @@ -4699,7 +4699,7 @@ int ReplicatedPG::recover_replicas(int max) } dout(10) << __func__ << ": recover_object_replicas(" << soid << ")" << dendl; - map::const_iterator p = m.missing.find(soid); + map::const_iterator p = m.missing.find(soid); started += recover_object_replicas(soid, p->second.need); } } @@ -4707,7 +4707,7 @@ int ReplicatedPG::recover_replicas(int max) return started; } -void ReplicatedPG::remove_object_with_snap_hardlinks(ObjectStore::Transaction& t, const sobject_t& soid) +void ReplicatedPG::remove_object_with_snap_hardlinks(ObjectStore::Transaction& t, const hobject_t& soid) { t.remove(coll, soid); if (soid.snap < CEPH_MAXSNAP) { @@ -4738,11 +4738,11 @@ void ReplicatedPG::clean_up_local(ObjectStore::Transaction& t) // FIXME: sloppy pobject vs object conversions abound! *** // be thorough. - vector ls; + vector ls; osd->store->collection_list(coll, ls); - set s; - for (vector::iterator i = ls.begin(); + set s; + for (vector::iterator i = ls.begin(); i != ls.end(); i++) if (i->snap == CEPH_NOSNAP) @@ -4750,7 +4750,7 @@ void ReplicatedPG::clean_up_local(ObjectStore::Transaction& t) dout(10) << " " << s.size() << " local objects" << dendl; - set did; + set did; for (list::reverse_iterator p = log.log.rbegin(); p != log.log.rend(); p++) { @@ -4770,7 +4770,7 @@ void ReplicatedPG::clean_up_local(ObjectStore::Transaction& t) } } - for (set::iterator i = s.begin(); + for (set::iterator i = s.begin(); i != s.end(); i++) { dout(10) << " deleting stray " << *i << dendl; @@ -4779,7 +4779,7 @@ void ReplicatedPG::clean_up_local(ObjectStore::Transaction& t) } else { // just scan the log. - set did; + set did; for (list::reverse_iterator p = log.log.rbegin(); p != log.log.rend(); p++) { @@ -4814,7 +4814,7 @@ int ReplicatedPG::_scrub(ScrubMap& scrubmap, int& errors, int& fixed) const char *mode = repair ? "repair":"scrub"; // traverse in reverse order. - sobject_t head; + hobject_t head; SnapSet snapset; vector::reverse_iterator curclone; @@ -4822,10 +4822,10 @@ int ReplicatedPG::_scrub(ScrubMap& scrubmap, int& errors, int& fixed) bufferlist last_data; - for (map::reverse_iterator p = scrubmap.objects.rbegin(); + for (map::reverse_iterator p = scrubmap.objects.rbegin(); p != scrubmap.objects.rend(); p++) { - const sobject_t& soid = p->first; + const hobject_t& soid = p->first; object_stat_sum_t stat; stat.num_objects++; @@ -4843,14 +4843,14 @@ int ReplicatedPG::_scrub(ScrubMap& scrubmap, int& errors, int& fixed) ::decode(snapset, blp); // did we finish the last oid? - if (head != sobject_t()) { + if (head != hobject_t()) { osd->clog.error() << "Missing clone(s) for " << head << "\n"; errors++; } // what will be next? if (snapset.clones.empty()) - head = sobject_t(); // no clones. + head = hobject_t(); // no clones. else { curclone = snapset.clones.rbegin(); head = p->first; @@ -4898,7 +4898,7 @@ int ReplicatedPG::_scrub(ScrubMap& scrubmap, int& errors, int& fixed) } } else if (soid.snap) { // it's a clone - assert(head != sobject_t()); + assert(head != hobject_t()); stat.num_object_clones++; @@ -4914,7 +4914,7 @@ int ReplicatedPG::_scrub(ScrubMap& scrubmap, int& errors, int& fixed) curclone++; if (curclone == snapset.clones.rend()) - head = sobject_t(); + head = hobject_t(); } else { // it's unversioned. @@ -5013,7 +5013,7 @@ boost::statechart::result ReplicatedPG::NotTrimming::react(const SnapTrim&) } // Primary trimming - vector &obs_to_trim = context().obs_to_trim; + vector &obs_to_trim = context().obs_to_trim; snapid_t &snap_to_trim = context().snap_to_trim; coll_t &col_to_trim = context().col_to_trim; if (!pg->get_obs_to_trim(snap_to_trim, @@ -5072,10 +5072,10 @@ boost::statechart::result ReplicatedPG::RepColTrim::react(const SnapTrim&) coll_t col_to_trim(pg->info.pgid, snap_to_trim); to_trim.erase(snap_to_trim); - vector obs_to_trim; + vector obs_to_trim; pg->osd->store->collection_list(col_to_trim, obs_to_trim); ObjectStore::Transaction *t = new ObjectStore::Transaction; - for (vector::iterator i = obs_to_trim.begin(); + for (vector::iterator i = obs_to_trim.begin(); i != obs_to_trim.end(); ++i) { t->collection_remove(col_to_trim, *i); @@ -5105,7 +5105,7 @@ boost::statechart::result ReplicatedPG::TrimmingObjects::react(const SnapTrim&) { dout(10) << "TrimmingObjects react" << dendl; ReplicatedPG *pg = context< SnapTrimmer >().pg; - vector &obs_to_trim = context().obs_to_trim; + vector &obs_to_trim = context().obs_to_trim; snapid_t &snap_to_trim = context().snap_to_trim; set &repops = context().repops; diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index 01e7e80387963..b494c075626d4 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -358,7 +358,7 @@ public: interval_set modified_ranges; ObjectContext *obc; // For ref counting purposes - map src_obc; + map src_obc; ObjectContext *clone_obc; // if we created a clone ObjectContext *snapset_obc; // if we created/deleted a snapdir @@ -405,7 +405,7 @@ public: OpContext *ctx; ObjectContext *obc; - map src_obc; + map src_obc; tid_t rep_tid; @@ -482,10 +482,10 @@ protected: friend class C_OSD_OpApplied; // projected object info - map object_contexts; + map object_contexts; map snapset_contexts; - ObjectContext *lookup_object_context(const sobject_t& soid) { + ObjectContext *lookup_object_context(const hobject_t& soid) { if (object_contexts.count(soid)) { ObjectContext *obc = object_contexts[soid]; obc->ref++; @@ -493,7 +493,7 @@ protected: } return NULL; } - ObjectContext *get_object_context(const sobject_t& soid, const object_locator_t& oloc, + ObjectContext *get_object_context(const hobject_t& soid, const object_locator_t& oloc, bool can_create); void register_object_context(ObjectContext *obc) { if (!obc->registered) { @@ -504,7 +504,7 @@ protected: register_snapset_context(obc->ssc); } void put_object_context(ObjectContext *obc); - void put_object_contexts(map& obcv); + void put_object_contexts(map& obcv); int find_object_context(const object_t& oid, const object_locator_t& oloc, snapid_t snapid, ObjectContext **pobc, bool can_create, snapid_t *psnapid=NULL); @@ -531,50 +531,50 @@ protected: bool need_size; interval_set data_subset, data_subset_pulling; }; - map pulling; + map pulling; // Reverse mapping from osd peer to objects beging pulled from that peer - map > pull_from_peer; + map > pull_from_peer; // push struct push_info_t { uint64_t size; eversion_t version; interval_set data_subset, data_subset_pushing; - map > clone_subsets; + map > clone_subsets; }; - map > pushing; + map > pushing; - int recover_object_replicas(const sobject_t& soid, eversion_t v); - void calc_head_subsets(SnapSet& snapset, const sobject_t& head, + int recover_object_replicas(const hobject_t& soid, eversion_t v); + void calc_head_subsets(SnapSet& snapset, const hobject_t& head, Missing& missing, interval_set& data_subset, - map >& clone_subsets); - void calc_clone_subsets(SnapSet& snapset, const sobject_t& poid, Missing& missing, + map >& clone_subsets); + void calc_clone_subsets(SnapSet& snapset, const hobject_t& poid, Missing& missing, interval_set& data_subset, - map >& clone_subsets); - void push_to_replica(ObjectContext *obc, const sobject_t& oid, int dest); - void push_start(const sobject_t& oid, int dest); - void push_start(const sobject_t& soid, int peer, + map >& clone_subsets); + void push_to_replica(ObjectContext *obc, const hobject_t& oid, int dest); + void push_start(const hobject_t& oid, int dest); + void push_start(const hobject_t& soid, int peer, uint64_t size, eversion_t version, interval_set &data_subset, - map >& clone_subsets); - int send_push_op(const sobject_t& oid, eversion_t version, int dest, + map >& clone_subsets); + int send_push_op(const hobject_t& oid, eversion_t version, int dest, uint64_t size, bool first, bool complete, interval_set& data_subset, - map >& clone_subsets); - void send_push_op_blank(const sobject_t& soid, int peer); + map >& clone_subsets); + void send_push_op_blank(const hobject_t& soid, int peer); // Cancels/resets pulls from peer void check_recovery_op_pulls(const OSDMap *map); - int pull(const sobject_t& oid); - void send_pull_op(const sobject_t& soid, eversion_t v, bool first, const interval_set& data_subset, int fromosd); + int pull(const hobject_t& oid); + void send_pull_op(const hobject_t& soid, eversion_t v, bool first, const interval_set& data_subset, int fromosd); // low level ops void _make_clone(ObjectStore::Transaction& t, - const sobject_t& head, const sobject_t& coid, + const hobject_t& head, const hobject_t& coid, object_info_t *poi); void make_writeable(OpContext *ctx); void log_op_stats(OpContext *ctx); @@ -588,7 +588,7 @@ protected: void log_op(vector& log, eversion_t trim_to, ObjectStore::Transaction& t); // pg on-disk content - void remove_object_with_snap_hardlinks(ObjectStore::Transaction& t, const sobject_t& soid); + void remove_object_with_snap_hardlinks(ObjectStore::Transaction& t, const hobject_t& soid); void clean_up_local(ObjectStore::Transaction& t); void _clear_recovery_state(); @@ -691,11 +691,11 @@ protected: int do_xattr_cmp_u64(int op, __u64 v1, bufferlist& xattr); int do_xattr_cmp_str(int op, string& v1s, bufferlist& xattr); - bool pgls_filter(PGLSFilter *filter, sobject_t& sobj, bufferlist& outdata); + bool pgls_filter(PGLSFilter *filter, hobject_t& sobj, bufferlist& outdata); int get_pgls_filter(bufferlist::iterator& iter, PGLSFilter **pfilter); public: - ReplicatedPG(OSD *o, PGPool *_pool, pg_t p, const sobject_t& oid, const sobject_t& ioid); + ReplicatedPG(OSD *o, PGPool *_pool, pg_t p, const hobject_t& oid, const hobject_t& ioid); ~ReplicatedPG() {} @@ -705,8 +705,8 @@ public: void do_sub_op_reply(MOSDSubOpReply *op); bool get_obs_to_trim(snapid_t &snap_to_trim, coll_t &col_to_trim, - vector &obs_to_trim); - RepGather *trim_object(const sobject_t &coid, const snapid_t &sn); + vector &obs_to_trim); + RepGather *trim_object(const hobject_t &coid, const snapid_t &sn); bool snap_trimmer(); int do_osd_ops(OpContext *ctx, vector& ops, bufferlist& odata); @@ -722,7 +722,7 @@ private: struct SnapTrimmer : public boost::statechart::state_machine< SnapTrimmer, NotTrimming > { ReplicatedPG *pg; set repops; - vector obs_to_trim; + vector obs_to_trim; snapid_t snap_to_trim; coll_t col_to_trim; bool need_share_pg_info; @@ -749,7 +749,7 @@ private: boost::statechart::custom_reaction< SnapTrim >, boost::statechart::transition< Reset, NotTrimming > > reactions; - vector::iterator position; + vector::iterator position; TrimmingObjects(my_context ctx); void exit(); boost::statechart::result react(const SnapTrim&); @@ -782,11 +782,11 @@ public: bool same_for_modify_since(epoch_t e); bool same_for_rep_modify_since(epoch_t e); - bool is_missing_object(const sobject_t& oid); - void wait_for_missing_object(const sobject_t& oid, Message *op); + bool is_missing_object(const hobject_t& oid); + void wait_for_missing_object(const hobject_t& oid, Message *op); - bool is_degraded_object(const sobject_t& oid); - void wait_for_degraded_object(const sobject_t& oid, Message *op); + bool is_degraded_object(const hobject_t& oid); + void wait_for_degraded_object(const hobject_t& oid, Message *op); void on_osd_failure(int o); void on_acker_change(); diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index d2221c8a3e633..96110972e12e2 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -618,11 +618,11 @@ void ScrubMap::merge_incr(const ScrubMap &l) logbl = l.logbl; valid_through = l.valid_through; - for (map::const_iterator p = l.objects.begin(); + for (map::const_iterator p = l.objects.begin(); p != l.objects.end(); p++){ if (p->second.negative) { - map::iterator q = objects.find(p->first); + map::iterator q = objects.find(p->first); if (q != objects.end()) { objects.erase(q); } diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index b65ec249da9f5..c63da65dbdfd8 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -102,7 +102,7 @@ enum { CEPH_RBD_RULE, }; -#define OSD_SUPERBLOCK_POBJECT sobject_t(object_t("osd_superblock"), 0) +#define OSD_SUPERBLOCK_POBJECT hobject_t(object_t("osd_superblock"), 0) // placement seed (a hash value) typedef uint32_t ps_t; @@ -1164,7 +1164,7 @@ static inline ostream& operator<<(ostream& out, const notify_info_t& n) { struct object_info_t { - sobject_t soid; + hobject_t soid; object_locator_t oloc; string category; @@ -1193,7 +1193,7 @@ struct object_info_t { decode(p); } - object_info_t(const sobject_t& s, const object_locator_t& o) + object_info_t(const hobject_t& s, const object_locator_t& o) : soid(s), oloc(o), size(0), lost(false), truncate_seq(0), truncate_size(0) {} @@ -1236,7 +1236,7 @@ struct ScrubMap { }; WRITE_CLASS_ENCODER(object) - map objects; + map objects; map attrs; bufferlist logbl; eversion_t valid_through; @@ -1254,7 +1254,7 @@ WRITE_CLASS_ENCODER(ScrubMap) struct OSDOp { ceph_osd_op op; bufferlist data; - sobject_t soid; + hobject_t soid; OSDOp() { memset(&op, 0, sizeof(ceph_osd_op)); -- 2.39.5