Skip to content

Commit

Permalink
Merge pull request #11010 from liewegas/wip-bluefs-compaction-race
Browse files Browse the repository at this point in the history
os/bluestore/BlueFS: do not start racing async compaction

Reviewed-by: Varada Kari <varada.kari@sandisk.com>
  • Loading branch information
liewegas committed Sep 8, 2016
2 parents fd1bf4a + dbe23c9 commit c934402
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/os/bluestore/BlueFS.cc
Expand Up @@ -998,10 +998,14 @@ bool BlueFS::_should_compact_log()
float ratio = (float)current / (float)expected;
dout(10) << __func__ << " current 0x" << std::hex << current
<< " expected " << expected << std::dec
<< " ratio " << ratio << dendl;
if (current < g_conf->bluefs_log_compact_min_size ||
ratio < g_conf->bluefs_log_compact_min_ratio)
<< " ratio " << ratio
<< (log_flushing ? " (async compaction in progress)" : "")
<< dendl;
if (log_flushing ||
current < g_conf->bluefs_log_compact_min_size ||
ratio < g_conf->bluefs_log_compact_min_ratio) {
return false;
}
return true;
}

Expand Down

0 comments on commit c934402

Please sign in to comment.