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: allow 'osd objectstore = random' to pick either filestore or bluestore #13754

Merged
merged 1 commit into from Mar 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/os/ObjectStore.cc
Expand Up @@ -77,6 +77,18 @@ ObjectStore *ObjectStore::create(CephContext *cct,
cct->check_experimental_feature_enabled("bluestore")) {
return new BlueStore(cct, data);
}
if (type == "random" &&
cct->check_experimental_feature_enabled("bluestore")) {
if (rand() % 2) {
return new FileStore(cct, data, journal, flags);
} else {
return new BlueStore(cct, data);
}
}
#else
if (type == "random") {
return new FileStore(cct, data, journal, flags);
}
#endif
if (type == "kstore" &&
cct->check_experimental_feature_enabled("kstore")) {
Expand Down