From: David Zafman Date: Sat, 6 Apr 2013 04:39:34 +0000 (-0700) Subject: osd: Create static PG::_write_log() function X-Git-Tag: v0.61~135^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=da39f911e0fd261038d7d4e5bc2820296a3fca3e;p=ceph.git osd: Create static PG::_write_log() function Signed-off-by: David Zafman --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 78c05246ea97..cebeaa4b577e 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -2579,9 +2579,10 @@ epoch_t PG::peek_map_epoch(ObjectStore *store, coll_t coll, hobject_t &infos_oid return cur_epoch; } -void PG::write_log(ObjectStore::Transaction& t) +void PG::_write_log(ObjectStore::Transaction& t, pg_log_t &log, + const hobject_t &log_oid, map &divergent_priors) { - dout(10) << "write_log" << dendl; + //dout(10) << "write_log" << dendl; t.remove(coll_t::META_COLL, log_oid); t.touch(coll_t::META_COLL, log_oid); map keys; @@ -2592,12 +2593,16 @@ void PG::write_log(ObjectStore::Transaction& t) p->encode_with_checksum(bl); keys[p->get_key_name()].claim(bl); } - dout(10) << "write_log " << keys.size() << " keys" << dendl; + //dout(10) << "write_log " << keys.size() << " keys" << dendl; - ::encode(ondisklog.divergent_priors, keys["divergent_priors"]); + ::encode(divergent_priors, keys["divergent_priors"]); t.omap_setkeys(coll_t::META_COLL, log_oid, keys); +} +void PG::write_log(ObjectStore::Transaction& t) +{ + _write_log(t, log, log_oid, ondisklog.divergent_priors); dirty_log = false; } diff --git a/src/osd/PG.h b/src/osd/PG.h index 5ab9caa2ebe9..d4bdbc8e4cfa 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -1837,6 +1837,8 @@ public: interval_set &snap_collections, hobject_t &infos_oid, __u8 info_struct_v, bool dirty_big_info); + static void _write_log(ObjectStore::Transaction& t, pg_log_t &log, + const hobject_t &log_oid, map &divergent_priors); void write_if_dirty(ObjectStore::Transaction& t); void add_log_entry(pg_log_entry_t& e, bufferlist& log_bl);