]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Objecter: add "honor_cache_redirects" flag covering cache settings
authorGreg Farnum <greg@inktank.com>
Thu, 26 Sep 2013 20:19:58 +0000 (13:19 -0700)
committerGreg Farnum <greg@inktank.com>
Mon, 30 Sep 2013 16:48:45 +0000 (09:48 -0700)
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>
src/osdc/Objecter.cc
src/osdc/Objecter.h

index 6c0486ce80157f0771f886c43b0f3122c7a007fa..d2c574d982e1eed85476d25f89b15f29a261d12a 100644 (file)
@@ -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())
index 880023ab37bc76bff4e943685c4c58e721bb8ebf..eef226ad9b2095e129594698be14766bc18c10c4 100644 (file)
@@ -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,