Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os/bluestore: simplify can_split_at() #11607

Merged
merged 2 commits into from
Oct 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/os/bluestore/BlueStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2260,7 +2260,7 @@ bool BlueStore::ExtentMap::do_write_check_depth(
bool do_collect = true;
if (depth < g_conf->bluestore_gc_max_blob_depth) {
*blob_depth = 1 + depth;
do_collect = false;;
do_collect = false;
}
dout(20) << __func__ << " GC depth " << (int)*blob_depth
<< ", gc 0x" << std::hex << *gc_start_offset << "~"
Expand Down Expand Up @@ -3210,7 +3210,7 @@ int BlueStore::_open_db(bool create)
return -EIO;
}
}
dout(10) << __func__ << " bluefs = " << bluefs << dendl;
dout(10) << __func__ << " do_bluefs = " << do_bluefs << dendl;

rocksdb::Env *env = NULL;
if (do_bluefs) {
Expand Down
5 changes: 1 addition & 4 deletions src/os/bluestore/bluestore_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,7 @@ struct bluestore_blob_t {
!has_flag(FLAG_HAS_UNUSED); // splitting unused set is complex
}
bool can_split_at(uint32_t blob_offset) const {
if (has_csum() &&
blob_offset % get_csum_chunk_size() != 0)
return false;
return true;
return !has_csum() || blob_offset % get_csum_chunk_size() == 0;
}

void dump(Formatter *f) const;
Expand Down