Skip to content

Commit 236f8b6

Browse files
authored
Merge pull request ceph#52193 from aclamk/wip-aclamk-fix-55260
os/bluestore: Fixes ceph-bluestore-tool bluefs-bdev-new-db
2 parents 09fb085 + 9c3a898 commit 236f8b6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/os/bluestore/bluestore_tool.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -880,17 +880,17 @@ int main(int argc, char **argv)
880880
return {"", false};
881881
}
882882
std::error_code ec;
883-
fs::path target_path = fs::weakly_canonical(fs::path{dev_target}, ec);
883+
fs::path target = fs::weakly_canonical(fs::path{dev_target}, ec);
884884
if (ec) {
885885
cerr << "failed to retrieve absolute path for " << dev_target
886886
<< ": " << ec.message()
887887
<< std::endl;
888888
exit(EXIT_FAILURE);
889889
}
890-
return {target_path.native(),
891-
(fs::exists(target_path) &&
892-
fs::is_regular_file(target_path) &&
893-
fs::file_size(target_path) > 0)};
890+
return {target.native(),
891+
fs::exists(target) &&
892+
(fs::is_block_file(target) ||
893+
(fs::is_regular_file(target) && fs::file_size(target) > 0))};
894894
}();
895895
// Attach either DB or WAL volume, create if needed
896896
// check if we need additional size specification

0 commit comments

Comments
 (0)