]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/os/bluestore/bluestore_tool.cc
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / os / bluestore / bluestore_tool.cc
index 41775c8a3070d2fbec4f63f87146176e27b69add..e63616bdd0203bb1ae41a037e88b0ea019bc8025 100644 (file)
@@ -878,17 +878,17 @@ int main(int argc, char **argv)
        return {"", false};
       }
       std::error_code ec;
-      fs::path target_path = fs::weakly_canonical(fs::path{dev_target}, ec);
+      fs::path target = fs::weakly_canonical(fs::path{dev_target}, ec);
       if (ec) {
        cerr << "failed to retrieve absolute path for " << dev_target
             << ": " << ec.message()
             << std::endl;
        exit(EXIT_FAILURE);
       }
-      return {target_path.native(),
-              (fs::exists(target_path) &&
-              fs::is_regular_file(target_path) &&
-              fs::file_size(target_path) > 0)};
+      return {target.native(),
+              fs::exists(target) &&
+               (fs::is_block_file(target) ||
+                (fs::is_regular_file(target) && fs::file_size(target) > 0))};
     }();
     // Attach either DB or WAL volume, create if needed
     // check if we need additional size specification