mirror of
https://github.com/ceph/ceph
synced 2025-01-29 14:34:40 +00:00
Merge pull request #20602 from gregsfortytwo/wip-23141-rotational
os/bluestore: correctly check all block devices to decide if journal is_rotational Reviewed-by: Sage Weil <sage@redhat.com> Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
This commit is contained in:
commit
054d0c54f8
@ -2448,7 +2448,10 @@ int BlueFS::unlink(const string& dirname, const string& filename)
|
||||
|
||||
bool BlueFS::wal_is_rotational()
|
||||
{
|
||||
if (!bdev[BDEV_WAL] || bdev[BDEV_WAL]->is_rotational())
|
||||
return true;
|
||||
return false;
|
||||
if (bdev[BDEV_WAL]) {
|
||||
return bdev[BDEV_WAL]->is_rotational();
|
||||
} else if (bdev[BDEV_DB]) {
|
||||
return bdev[BDEV_DB]->is_rotational();
|
||||
}
|
||||
return bdev[BDEV_SLOW]->is_rotational();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user