Skip to content

Commit 9c3a898

Browse files
ifed01aclamk
authored andcommitted
os/bluestore: don't require bluestore_db_block_size when attaching new
db/wal Fixes: https://tracker.ceph.com/issues/55260 Signed-off-by: Igor Fedotov <[email protected]>
1 parent b76b6ea commit 9c3a898

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
@@ -878,17 +878,17 @@ int main(int argc, char **argv)
878878
return {"", false};
879879
}
880880
std::error_code ec;
881-
fs::path target_path = fs::weakly_canonical(fs::path{dev_target}, ec);
881+
fs::path target = fs::weakly_canonical(fs::path{dev_target}, ec);
882882
if (ec) {
883883
cerr << "failed to retrieve absolute path for " << dev_target
884884
<< ": " << ec.message()
885885
<< std::endl;
886886
exit(EXIT_FAILURE);
887887
}
888-
return {target_path.native(),
889-
(fs::exists(target_path) &&
890-
fs::is_regular_file(target_path) &&
891-
fs::file_size(target_path) > 0)};
888+
return {target.native(),
889+
fs::exists(target) &&
890+
(fs::is_block_file(target) ||
891+
(fs::is_regular_file(target) && fs::file_size(target) > 0))};
892892
}();
893893
// Attach either DB or WAL volume, create if needed
894894
// check if we need additional size specification

0 commit comments

Comments
 (0)