Skip to content

Commit

Permalink
Merge pull request #11761 from xiexingguo/xxg-wip-fix-envmirror-cleanup
Browse files Browse the repository at this point in the history
os/bluestore: fixes and cleanups

Reviewed-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Nov 3, 2016
2 parents 47a2749 + a47e20a commit 13dbff2
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/os/bluestore/BlueStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,7 @@ void BlueStore::Cache::trim(
return;
}

uint64_t need_to_free = 0;
if (current > target_bytes) {
need_to_free = current - target_bytes;
}
uint64_t need_to_free = current - target_bytes;
uint64_t free_buffer = 0;
uint64_t free_meta = 0;
if (current_buffer > target_buffer) {
Expand Down Expand Up @@ -1566,8 +1563,7 @@ ostream& operator<<(ostream& out, const BlueStore::Extent& e)

BlueStore::ExtentMap::ExtentMap(Onode *o)
: onode(o),
inline_bl(
g_conf ? g_conf->bluestore_extent_map_inline_shard_prealloc_size : 4096) {
inline_bl(g_conf->bluestore_extent_map_inline_shard_prealloc_size) {
}


Expand Down Expand Up @@ -3420,7 +3416,7 @@ int BlueStore::_open_db(bool create)
rocksdb::Env *b = rocksdb::Env::Default();
if (create) {
string cmd = "rm -rf " + path + "/db " +
path + "/db.slow" +
path + "/db.slow " +
path + "/db.wal";
int r = system(cmd.c_str());
(void)r;
Expand Down Expand Up @@ -4143,7 +4139,6 @@ int BlueStore::mount()
return 0;

out_stop:
mempool_thread.shutdown();
_kv_stop();
wal_wq.drain();
wal_tp.stop();
Expand Down

0 comments on commit 13dbff2

Please sign in to comment.