]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PrimaryLogPG: non-const helpers where possible
authorSage Weil <sage@redhat.com>
Mon, 20 Feb 2017 19:20:18 +0000 (14:20 -0500)
committerSage Weil <sage@redhat.com>
Mon, 20 Feb 2017 19:22:06 +0000 (14:22 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h

index 2ed79b3f3e5e455703fbcd1839a0c6a8740a80d3..2709c602a24bdac2b7aad5980e6ba69b364edfaa 100644 (file)
@@ -8861,9 +8861,10 @@ ObjectContextRef PrimaryLogPG::create_object_context(const object_info_t& oi,
   return obc;
 }
 
-ObjectContextRef PrimaryLogPG::get_object_context(const hobject_t& soid,
-                                                 bool can_create,
-                                                 map<string, bufferlist> *attrs)
+ObjectContextRef PrimaryLogPG::get_object_context(
+  const hobject_t& soid,
+  bool can_create,
+  const map<string, bufferlist> *attrs)
 {
   assert(
     attrs || !pg_log.get_missing().is_missing(soid) ||
@@ -9280,7 +9281,7 @@ void PrimaryLogPG::kick_object_context_blocked(ObjectContextRef obc)
 SnapSetContext *PrimaryLogPG::get_snapset_context(
   const hobject_t& oid,
   bool can_create,
-  map<string, bufferlist> *attrs,
+  const map<string, bufferlist> *attrs,
   bool oid_existed)
 {
   Mutex::Locker l(snapset_contexts_lock);
index eb49cef3d711e86c087f71fe2b99cb39bd6b0250..f48c1610c8e83d2f1b30780027e063bd71b0af54 100644 (file)
@@ -337,7 +337,7 @@ public:
 
   ObjectContextRef get_obc(
     const hobject_t &hoid,
-    map<string, bufferlist> &attrs) override {
+    const map<string, bufferlist> &attrs) override {
     return get_object_context(hoid, true, &attrs);
   }
 
@@ -370,7 +370,7 @@ public:
 
   void log_operation(
     const vector<pg_log_entry_t> &logv,
-    boost::optional<pg_hit_set_history_t> &hset_history,
+    const boost::optional<pg_hit_set_history_t> &hset_history,
     const eversion_t &trim_to,
     const eversion_t &roll_forward_to,
     bool transaction_applied,
@@ -952,7 +952,7 @@ protected:
   ObjectContextRef get_object_context(
     const hobject_t& soid,
     bool can_create,
-    map<string, bufferlist> *attrs = 0
+    const map<string, bufferlist> *attrs = 0
     );
 
   void context_registry_on_change();
@@ -972,7 +972,7 @@ protected:
   SnapSetContext *get_snapset_context(
     const hobject_t& oid,
     bool can_create,
-    map<string, bufferlist> *attrs = 0,
+    const map<string, bufferlist> *attrs = 0,
     bool oid_existed = true //indicate this oid whether exsited in backend
     );
   void register_snapset_context(SnapSetContext *ssc) {