]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PGLog: pass only divergent_priors, not ondisklog
authorSamuel Just <sam.just@inktank.com>
Mon, 10 Jun 2013 20:54:18 +0000 (13:54 -0700)
committerSamuel Just <sam.just@inktank.com>
Mon, 17 Jun 2013 21:50:52 +0000 (14:50 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/PGLog.cc
src/osd/PGLog.h

index e698de3c4451d6ab0a7e4548f2c1ff7e9bba0ed4..38896dbc1188ebecb21a72326ac61d9f01607342 100644 (file)
@@ -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<eversion_t, hobject_t> &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<eversion_t, hobject_t> &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;
index f59c285612645f7f495881712593dc486045441a..23198127276aac96be9e963ea46675310321ae57 100644 (file)
@@ -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<eversion_t, hobject_t> &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<eversion_t, hobject_t> &divergent_priors,
+    IndexedLog &log,
     pg_missing_t &missing, ostringstream &oss);
 };