NCB code needs to recover allocation map after an OSD crash.
The recovery process on rotational drives is about 20x slower than SSD making this solution unacceptable for that environmentÂ
Signed-off-by: Gabriel Benhanokh <gbenhano@redhat.com>
return bdev[BDEV_SLOW]->is_rotational();
}
+bool BlueFS::db_is_rotational()
+{
+ if (bdev[BDEV_DB]) {
+ return bdev[BDEV_DB]->is_rotational();
+ }
+ return bdev[BDEV_SLOW]->is_rotational();
+}
+
/*
Algorithm.
do_replay_recovery_read is used when bluefs log abruptly ends, but it seems that more data should be there.
int mkdir(std::string_view dirname);
int rmdir(std::string_view dirname);
bool wal_is_rotational();
+ bool db_is_rotational();
bool dir_exists(std::string_view dirname);
int stat(std::string_view dirname, std::string_view filename,
return bluefs->wal_is_rotational();
}
+bool BlueStore::is_db_rotational()
+{
+ if (!bluefs) {
+ dout(5) << __func__ << " bluefs disabled, default to store media type"
+ << dendl;
+ return is_rotational();
+ }
+ dout(10) << __func__ << " " << (int)bluefs->db_is_rotational() << dendl;
+ return bluefs->db_is_rotational();
+}
+
bool BlueStore::_use_rotational_settings()
{
if (cct->_conf->bluestore_debug_enforce_settings == "hdd") {
}
// when function is called in repair mode (to_repair=true) we skip db->open()/create()
- if (!read_only && !to_repair && cct->_conf->bluestore_allocation_from_file
+ if (!is_db_rotational() && !read_only && !to_repair && cct->_conf->bluestore_allocation_from_file
#ifdef HAVE_LIBZBD
&& !bdev->is_smr()
#endif
bool is_rotational() override;
bool is_journal_rotational() override;
+ bool is_db_rotational() ;
std::string get_default_device_class() override {
std::string device_class;