]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-bluestore-tool: only infer devs if devs.empty()
authorSage Weil <sage@redhat.com>
Thu, 12 Oct 2017 13:48:46 +0000 (08:48 -0500)
committerSage Weil <sage@redhat.com>
Thu, 19 Oct 2017 13:21:59 +0000 (08:21 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 2d217367af0df5e18394b1c6179d92db3c0b4448)

src/os/bluestore/bluestore_tool.cc

index c1b44ced8e0593d0695d2f8c7dfb141060216e24..e0c6176d61e6a1afadac37e54fc3db33e9801a4d 100644 (file)
@@ -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);
+       }
       }
     }
   }