]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: don't log op stats for proxy read in the cache tier 3527/head
authorZhiqiang Wang <zhiqiang.wang@intel.com>
Thu, 29 Jan 2015 07:23:38 +0000 (15:23 +0800)
committerZhiqiang Wang <zhiqiang.wang@intel.com>
Thu, 29 Jan 2015 07:23:38 +0000 (15:23 +0800)
Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h

index f95d453a972d4e493a2b3f942729b987e5552b32..8836ed22debc612e739e2541abb4628ded7579a3 100644 (file)
@@ -2034,6 +2034,7 @@ void ReplicatedPG::finish_proxy_read(hobject_t oid, ceph_tid_t tid, int r)
   ctx->reply = new MOSDOpReply(m, 0, get_osdmap()->get_epoch(), 0, false);
   ctx->user_at_version = prdop->user_version;
   ctx->data_off = prdop->data_offset;
+  ctx->ignore_log_op_stats = true;
   complete_read_ctx(r, ctx);
 }
 
@@ -5969,8 +5970,10 @@ void ReplicatedPG::complete_read_ctx(int result, OpContext *ctx)
   ctx->reply = NULL;
 
   if (result >= 0) {
-    log_op_stats(ctx);
-    publish_stats_to_osd();
+    if (!ctx->ignore_log_op_stats) {
+      log_op_stats(ctx);
+      publish_stats_to_osd();
+    }
 
     // on read, return the current object version
     if (ctx->obs) {
index 0b0adf5e53cd9b7b69f5b03b674de9993f3b375f..28707331f7d759e60a4458c13de992a4ad26fa23 100644 (file)
@@ -478,6 +478,7 @@ public:
     bool undirty;         // user explicitly un-dirtying this object
     bool cache_evict;     ///< true if this is a cache eviction
     bool ignore_cache;    ///< true if IGNORE_CACHE flag is set
+    bool ignore_log_op_stats;  // don't log op stats
 
     // side effects
     list<pair<watch_info_t,bool> > watch_connects; ///< new watch + will_ping flag
@@ -592,7 +593,7 @@ public:
       snapset(0),
       new_obs(obs->oi, obs->exists),
       modify(false), user_modify(false), undirty(false), cache_evict(false),
-      ignore_cache(false),
+      ignore_cache(false), ignore_log_op_stats(false),
       bytes_written(0), bytes_read(0), user_at_version(0),
       current_osd_subop_num(0),
       op_t(NULL),
@@ -615,7 +616,7 @@ public:
               vector<OSDOp>& _ops, ReplicatedPG *_pg) :
       op(_op), reqid(_reqid), ops(_ops), obs(NULL), snapset(0),
       modify(false), user_modify(false), undirty(false), cache_evict(false),
-      ignore_cache(false),
+      ignore_cache(false), ignore_log_op_stats(false),
       bytes_written(0), bytes_read(0), user_at_version(0),
       current_osd_subop_num(0),
       op_t(NULL),