]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OpRequest: pass string by const& 3713/head
authorKefu Chai <kchai@redhat.com>
Thu, 12 Feb 2015 02:32:34 +0000 (10:32 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 12 Feb 2015 05:10:28 +0000 (13:10 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/osd/OpRequest.cc
src/osd/OpRequest.h

index c455c7cde2a1a7d0020ecf32fb693c5e9d08e435..12963342feb78b616c6dc075863ccfcf440b2946 100644 (file)
@@ -119,7 +119,7 @@ void OpRequest::set_pg_op() { set_rmw_flags(CEPH_OSD_RMW_FLAG_PGOP); }
 void OpRequest::set_cache() { set_rmw_flags(CEPH_OSD_RMW_FLAG_CACHE); }
 void OpRequest::set_promote() { set_rmw_flags(CEPH_OSD_RMW_FLAG_PROMOTE); }
 
-void OpRequest::mark_flag_point(uint8_t flag, string s) {
+void OpRequest::mark_flag_point(uint8_t flag, const string& s) {
 #ifdef WITH_LTTNG
   uint8_t old_flags = hit_flag_points;
 #endif
index 1835563470f93a4c587f64acf3cee011051573ba..88a2704d5fa4fa14f7d057cd75f17be5f26ca6a0 100644 (file)
@@ -138,13 +138,13 @@ public:
   void mark_reached_pg() {
     mark_flag_point(flag_reached_pg, "reached_pg");
   }
-  void mark_delayed(string s) {
+  void mark_delayed(const string& s) {
     mark_flag_point(flag_delayed, s);
   }
   void mark_started() {
     mark_flag_point(flag_started, "started");
   }
-  void mark_sub_op_sent(string s) {
+  void mark_sub_op_sent(const string& s) {
     mark_flag_point(flag_sub_op_sent, s);
   }
   void mark_commit_sent() {
@@ -166,7 +166,7 @@ public:
 
 private:
   void set_rmw_flags(int flags);
-  void mark_flag_point(uint8_t flag, string s);
+  void mark_flag_point(uint8_t flag, const string& s);
 };
 
 typedef OpRequest::Ref OpRequestRef;