summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Farnum <greg@inktank.com>2013-09-26 13:19:58 -0700
committerGreg Farnum <greg@inktank.com>2013-09-30 09:48:45 -0700
commit35cdd89ca450b974d87065b101008efc7c72847f (patch)
tree6d371c645d97cb88bf72709ef8122855ed561102
parent76321f8fc8ab5287e1a12473df8337cfd7711f4c (diff)
downloadceph-35cdd89ca450b974d87065b101008efc7c72847f.tar.gz
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 <greg@inktank.com>
-rw-r--r--src/osdc/Objecter.cc2
-rw-r--r--src/osdc/Objecter.h5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc
index 6c0486ce801..d2c574d982e 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 880023ab37b..eef226ad9b2 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<tid_t, Op*>& need_resend,
list<LingerOp*>& need_resend_linger,