]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PGLog: s/read_log/read_log_and_missing/g
authorSamuel Just <sjust@redhat.com>
Tue, 10 May 2016 21:03:03 +0000 (14:03 -0700)
committerSamuel Just <sjust@redhat.com>
Thu, 14 Jul 2016 14:48:13 +0000 (07:48 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/PG.cc
src/osd/PGLog.h
src/tools/ceph_objectstore_tool.cc

index 6b38a8814da2d905b7cf83cb3392dc6fa30d3633..7879467e43e5e1f7b0ad5f3c8e3e4e5cf5eff976 100644 (file)
@@ -68,7 +68,7 @@
 #undef dout_prefix
 #define dout_prefix _prefix(_dout, this)
 
-// prefix pgmeta_oid keys with _ so that PGLog::read_log() can
+// prefix pgmeta_oid keys with _ so that PGLog::read_log_and_missing() can
 // easily skip them
 const string infover_key("_infover");
 const string info_key("_info");
@@ -3121,7 +3121,7 @@ void PG::read_state(ObjectStore *store, bufferlist &bl)
   assert(r >= 0);
 
   ostringstream oss;
-  pg_log.read_log(store,
+  pg_log.read_log_and_missing(store,
                  coll,
                  info_struct_v < 8 ? coll_t::meta() : coll,
                  ghobject_t(info_struct_v < 8 ? OSD::make_pg_log_oid(pg_id) : pgmeta_oid),
index 09e157e3bf571e3498a527aaa4f56850e2c3d767..03c99cbff3ca41fca5efa585ebf3ef1810eef188 100644 (file)
@@ -59,10 +59,10 @@ struct PGLog : DoutPrefixProvider {
   };
 
   /* Exceptions */
-  class read_log_error : public buffer::error {
+  class read_log_and_missing_error : public buffer::error {
   public:
-    explicit read_log_error(const char *what) {
-      snprintf(buf, sizeof(buf), "read_log_error: %s", what);
+    explicit read_log_and_missing_error(const char *what) {
+      snprintf(buf, sizeof(buf), "read_log_and_missing_error: %s", what);
     }
     const char *what() const throw () {
       return buf;
@@ -1031,10 +1031,10 @@ public:
     set<string> *log_keys_debug
     );
 
-  void read_log(ObjectStore *store, coll_t pg_coll,
+  void read_log_and_missing(ObjectStore *store, coll_t pg_coll,
                coll_t log_coll, ghobject_t log_oid,
                const pg_info_t &info, ostringstream &oss) {
-    return read_log(
+    return read_log_and_missing(
       store, pg_coll, log_coll, log_oid, info, divergent_priors,
       log, missing, oss,
       this,
@@ -1042,7 +1042,7 @@ public:
   }
 
   template <typename missing_type>
-  static void read_log(ObjectStore *store, coll_t pg_coll,
+  static void read_log_and_missing(ObjectStore *store, coll_t pg_coll,
     coll_t log_coll, ghobject_t log_oid,
     const pg_info_t &info, map<eversion_t, hobject_t> &divergent_priors,
     IndexedLog &log,
@@ -1050,7 +1050,7 @@ public:
     const DoutPrefixProvider *dpp = NULL,
     set<string> *log_keys_debug = 0
     ) {
-    ldpp_dout(dpp, 20) << "read_log coll " << pg_coll
+    ldpp_dout(dpp, 20) << "read_log_and_missing coll " << pg_coll
                       << " log_oid " << log_oid << dendl;
 
     // legacy?
@@ -1073,7 +1073,7 @@ public:
        bufferlist::iterator bp = bl.begin();
        if (p->key() == "divergent_priors") {
          ::decode(divergent_priors, bp);
-         ldpp_dout(dpp, 20) << "read_log " << divergent_priors.size()
+         ldpp_dout(dpp, 20) << "read_log_and_missing " << divergent_priors.size()
                             << " divergent_priors" << dendl;
        } else if (p->key() == "can_rollback_to") {
          ::decode(log.can_rollback_to, bp);
@@ -1082,7 +1082,7 @@ public:
        } else {
          pg_log_entry_t e;
          e.decode_with_checksum(bp);
-         ldpp_dout(dpp, 20) << "read_log " << e << dendl;
+         ldpp_dout(dpp, 20) << "read_log_and_missing " << e << dendl;
          if (!log.log.empty()) {
            pg_log_entry_t last_e(log.log.back());
            assert(last_e.version.version < e.version.version);
@@ -1100,7 +1100,7 @@ public:
 
     // build missing
     if (info.last_complete < info.last_update) {
-      ldpp_dout(dpp, 10) << "read_log checking for missing items over interval ("
+      ldpp_dout(dpp, 10) << "read_log_and_missing checking for missing items over interval ("
                         << info.last_complete
                         << "," << info.last_update << "]" << dendl;
 
@@ -1127,12 +1127,12 @@ public:
        if (r >= 0) {
          object_info_t oi(bv);
          if (oi.version < i->version) {
-           ldpp_dout(dpp, 15) << "read_log  missing " << *i
+           ldpp_dout(dpp, 15) << "read_log_and_missing  missing " << *i
                               << " (have " << oi.version << ")" << dendl;
            missing.add(i->soid, i->version, oi.version);
          }
        } else {
-         ldpp_dout(dpp, 15) << "read_log  missing " << *i << dendl;
+         ldpp_dout(dpp, 15) << "read_log_and_missing  missing " << *i << dendl;
          missing.add(i->soid, i->version, eversion_t());
        }
       }
@@ -1166,12 +1166,12 @@ public:
           */
          assert(oi.version == i->first);
        } else {
-         ldpp_dout(dpp, 15) << "read_log  missing " << *i << dendl;
+         ldpp_dout(dpp, 15) << "read_log_and_missing  missing " << *i << dendl;
          missing.add(i->second, i->first, eversion_t());
        }
       }
     }
-    ldpp_dout(dpp, 10) << "read_log done" << dendl;
+    ldpp_dout(dpp, 10) << "read_log_and_missing done" << dendl;
   }
 };
   
index ab8f22a72d664efa3d8bbb494f6a5061acf3c749..26329ee2501b66b8dadc9b61b91f084a9f834cd5 100644 (file)
@@ -351,7 +351,7 @@ int get_log(ObjectStore *fs, __u8 struct_ver,
   try {
     ostringstream oss;
     assert(struct_ver > 0);
-    PGLog::read_log(fs, coll,
+    PGLog::read_log_and_missing(fs, coll,
                    struct_ver >= 8 ? coll : coll_t::meta(),
                    struct_ver >= 8 ? pgid.make_pgmeta_oid() : log_oid,
                    info, divergent_priors, log, missing, oss);
@@ -359,7 +359,7 @@ int get_log(ObjectStore *fs, __u8 struct_ver,
       cerr << oss.str() << std::endl;
   }
   catch (const buffer::error &e) {
-    cerr << "read_log threw exception error " << e.what() << std::endl;
+    cerr << "read_log_and_missing threw exception error " << e.what() << std::endl;
     return -EFAULT;
   }
   return 0;