From: Samuel Just Date: Mon, 10 Jun 2013 20:54:18 +0000 (-0700) Subject: PGLog: pass only divergent_priors, not ondisklog X-Git-Tag: v0.66~50^2~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a9a41bc0db2ad8f364e68107b237f03172e45a6e;p=ceph.git PGLog: pass only divergent_priors, not ondisklog Signed-off-by: Samuel Just --- diff --git a/src/osd/PGLog.cc b/src/osd/PGLog.cc index e698de3c445..38896dbc118 100644 --- a/src/osd/PGLog.cc +++ b/src/osd/PGLog.cc @@ -550,7 +550,8 @@ void PGLog::write_log(ObjectStore::Transaction& t, pg_log_t &log, } bool PGLog::read_log(ObjectStore *store, coll_t coll, hobject_t log_oid, - const pg_info_t &info, OndiskLog &ondisklog, IndexedLog &log, + const pg_info_t &info, map &divergent_priors, + IndexedLog &log, pg_missing_t &missing, ostringstream &oss) { dout(10) << "read_log" << dendl; @@ -561,7 +562,7 @@ bool PGLog::read_log(ObjectStore *store, coll_t coll, hobject_t log_oid, int r = store->stat(coll_t::META_COLL, log_oid, &st); assert(r == 0); if (st.st_size > 0) { - read_log_old(store, coll, log_oid, info, ondisklog, log, missing, oss); + read_log_old(store, coll, log_oid, info, divergent_priors, log, missing, oss); rewrite_log = true; } else { log.tail = info.log_tail; @@ -651,7 +652,8 @@ bool PGLog::read_log(ObjectStore *store, coll_t coll, hobject_t log_oid, } void PGLog::read_log_old(ObjectStore *store, coll_t coll, hobject_t log_oid, - const pg_info_t &info, OndiskLog &ondisklog, IndexedLog &log, + const pg_info_t &info, map &divergent_priors, + IndexedLog &log, pg_missing_t &missing, ostringstream &oss) { // load bounds, based on old OndiskLog encoding. @@ -673,7 +675,7 @@ void PGLog::read_log_old(ObjectStore *store, coll_t coll, hobject_t log_oid, else ondisklog_zero_to = 0; if (struct_v >= 5) - ::decode(ondisklog.divergent_priors, bl); + ::decode(divergent_priors, bl); DECODE_FINISH(bl); } uint64_t ondisklog_length = ondisklog_head - ondisklog_tail; diff --git a/src/osd/PGLog.h b/src/osd/PGLog.h index f59c2856126..23198127276 100644 --- a/src/osd/PGLog.h +++ b/src/osd/PGLog.h @@ -379,17 +379,20 @@ public: bool read_log(ObjectStore *store, coll_t coll, hobject_t log_oid, const pg_info_t &info, ostringstream &oss) { - return read_log(store, coll, log_oid, info, ondisklog, log, missing, oss); + return read_log(store, coll, log_oid, info, ondisklog.divergent_priors, + log, missing, oss); } /// return true if the log should be rewritten static bool read_log(ObjectStore *store, coll_t coll, hobject_t log_oid, - const pg_info_t &info, OndiskLog &ondisklog, IndexedLog &log, + const pg_info_t &info, map &divergent_priors, + IndexedLog &log, pg_missing_t &missing, ostringstream &oss); protected: static void read_log_old(ObjectStore *store, coll_t coll, hobject_t log_oid, - const pg_info_t &info, OndiskLog &ondisklog, IndexedLog &log, + const pg_info_t &info, map &divergent_priors, + IndexedLog &log, pg_missing_t &missing, ostringstream &oss); };