From 2d5371ddafc2cf5924951468b56ccf26b48e2ef0 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 17 Feb 2014 12:18:49 -0800 Subject: [PATCH] osd: l_osd_tier_evict Signed-off-by: Sage Weil --- src/osd/OSD.cc | 1 + src/osd/OSD.h | 1 + src/osd/ReplicatedPG.cc | 2 ++ 3 files changed, 4 insertions(+) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index d725c6d63a2..ac458c77742 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1439,6 +1439,7 @@ void OSD::create_logger() osd_plb.add_u64_counter(l_osd_tier_flush_fail, "tier_flush_fail"); osd_plb.add_u64_counter(l_osd_tier_try_flush, "tier_try_flush"); osd_plb.add_u64_counter(l_osd_tier_try_flush_fail, "tier_try_flush_fail"); + osd_plb.add_u64_counter(l_osd_tier_evict, "tier_evict"); logger = osd_plb.create_perf_counters(); cct->get_perfcounters_collection()->add(logger); } diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 73bbaad1143..1b684652fdc 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -129,6 +129,7 @@ enum { l_osd_tier_flush_fail, l_osd_tier_try_flush, l_osd_tier_try_flush_fail, + l_osd_tier_evict, l_osd_last, }; diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index ae31ed70e38..cc1bf6c5be1 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -3165,6 +3165,7 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector& ops) break; } result = _delete_head(ctx, true); + osd->logger->inc(l_osd_tier_evict); } break; @@ -10481,6 +10482,7 @@ bool ReplicatedPG::agent_maybe_evict(ObjectContextRef& obc) assert(r == 0); finish_ctx(ctx, pg_log_entry_t::DELETE); simple_repop_submit(repop); + osd->logger->inc(l_osd_tier_evict); return true; }