From: Greg Farnum Date: Thu, 26 Sep 2013 20:19:58 +0000 (-0700) Subject: Objecter: add "honor_cache_redirects" flag covering cache settings X-Git-Tag: v0.71~53^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=35cdd89ca450b974d87065b101008efc7c72847f;p=ceph.git Objecter: add "honor_cache_redirects" flag covering cache settings When set to false, we do not redirect based on the cache_pool data in the OSDMap. We'll use this so the OSDs can actually fetch data into the cache pools on promotion! Signed-off-by: Greg Farnum --- diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index 6c0486ce8015..d2c574d982e1 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -1338,7 +1338,7 @@ int Objecter::recalc_op_target(Op *op) need_check_tiering = true; } - if (need_check_tiering) { + if (honor_cache_redirects && need_check_tiering) { const pg_pool_t *pi = osdmap->get_pg_pool(op->base_oloc.pool); if (pi) { if (is_read && pi->has_read_tier()) diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h index 880023ab37bc..eef226ad9b20 100644 --- a/src/osdc/Objecter.h +++ b/src/osdc/Objecter.h @@ -785,6 +785,7 @@ class Objecter { int global_op_flags; // flags which are applied to each IO op bool keep_balanced_budget; bool honor_osdmap_full; + bool honor_cache_redirects; void maybe_request_map(); @@ -1260,6 +1261,7 @@ public: num_unacked(0), num_uncommitted(0), global_op_flags(0), keep_balanced_budget(false), honor_osdmap_full(true), + honor_cache_redirects(true), last_seen_osdmap_version(0), last_seen_pgmap_version(0), client_lock(l), timer(t), @@ -1293,6 +1295,9 @@ public: void set_honor_osdmap_full() { honor_osdmap_full = true; } void unset_honor_osdmap_full() { honor_osdmap_full = false; } + void set_honor_cache_redirects() { honor_cache_redirects = true; } + void unset_honor_cache_redirects() { honor_cache_redirects = false; } + void scan_requests(bool skipped_map, map& need_resend, list& need_resend_linger,