]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: flush dirty data if cache_target_dirty_ratio = 0.0 21723/head
authorNing Yao <yaoning@unitedstack.com>
Sun, 29 Apr 2018 07:58:01 +0000 (15:58 +0800)
committerNing Yao <yaoning@unitedstack.com>
Mon, 30 Apr 2018 05:26:54 +0000 (13:26 +0800)
ceph will not flush all dirty data to base tier, if
target_max_bytes and target_max_objects is large enough.

Signed-off-by: Ning Yao <yaoning@unitedstack.com>
src/osd/PrimaryLogPG.cc

index 4454f6b90093f9b1b81c9c00e34921916d3d37b0..0e41a1feee9c5026a9e94c19417514da5c5c3576 100644 (file)
@@ -14218,7 +14218,7 @@ bool PrimaryLogPG::agent_choose_mode(bool restart, OpRequestRef op)
 
   if (dirty_micro > flush_high_target) {
     flush_mode = TierAgentState::FLUSH_MODE_HIGH;
-  } else if (dirty_micro > flush_target) {
+  } else if (dirty_micro > flush_target || (!flush_target && num_dirty > 0)) {
     flush_mode = TierAgentState::FLUSH_MODE_LOW;
   }