summaryrefslogtreecommitdiffstats
path: root/src/os/bluestore/bluestore_tool.cc
diff options
context:
space:
mode:
authorSage Weil <sage@redhat.com>2017-10-12 15:48:46 +0200
committerSage Weil <sage@redhat.com>2017-10-16 21:29:10 +0200
commit2d217367af0df5e18394b1c6179d92db3c0b4448 (patch)
tree7bfc25a46dd7ca9dde17993565fc53db5db58758 /src/os/bluestore/bluestore_tool.cc
parentceph-bluestore-tool: implement prime-osd-dir (diff)
downloadceph-2d217367af0df5e18394b1c6179d92db3c0b4448.tar.xz
ceph-2d217367af0df5e18394b1c6179d92db3c0b4448.zip
ceph-bluestore-tool: only infer devs if devs.empty()
Signed-off-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'src/os/bluestore/bluestore_tool.cc')
-rw-r--r--src/os/bluestore/bluestore_tool.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/os/bluestore/bluestore_tool.cc b/src/os/bluestore/bluestore_tool.cc
index c1b44ced8e0..e0c6176d61e 100644
--- a/src/os/bluestore/bluestore_tool.cc
+++ b/src/os/bluestore/bluestore_tool.cc
@@ -195,12 +195,14 @@ int main(int argc, char **argv)
cerr << "must specify bluestore path *or* raw device(s)" << std::endl;
exit(EXIT_FAILURE);
}
- cout << "infering bluefs devices from bluestore path" << std::endl;
- for (auto fn : {"block", "block.wal", "block.db"}) {
- string p = path + "/" + fn;
- struct stat st;
- if (::stat(p.c_str(), &st) == 0) {
- devs.push_back(p);
+ if (devs.empty()) {
+ cout << "infering bluefs devices from bluestore path" << std::endl;
+ for (auto fn : {"block", "block.wal", "block.db"}) {
+ string p = path + "/" + fn;
+ struct stat st;
+ if (::stat(p.c_str(), &st) == 0) {
+ devs.push_back(p);
+ }
}
}
}