mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-21 03:46:37 +00:00
fix(ecstore): remove stale disk TODOs (#3022)
This commit is contained in:
@@ -557,8 +557,6 @@ impl LocalDiskWrapper {
|
|||||||
|
|
||||||
/// Monitor disk writability periodically
|
/// Monitor disk writability periodically
|
||||||
async fn monitor_disk_writable(disk: Arc<LocalDisk>, health: Arc<DiskHealthTracker>, cancel_token: CancellationToken) {
|
async fn monitor_disk_writable(disk: Arc<LocalDisk>, health: Arc<DiskHealthTracker>, cancel_token: CancellationToken) {
|
||||||
// TODO: config interval
|
|
||||||
|
|
||||||
let mut interval = time::interval(get_drive_active_check_interval());
|
let mut interval = time::interval(get_drive_active_check_interval());
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
|
|||||||
@@ -3051,7 +3051,6 @@ impl DiskAPI for LocalDisk {
|
|||||||
#[tracing::instrument(skip(self))]
|
#[tracing::instrument(skip(self))]
|
||||||
async fn disk_info(&self, _: &DiskInfoOptions) -> Result<DiskInfo> {
|
async fn disk_info(&self, _: &DiskInfoOptions) -> Result<DiskInfo> {
|
||||||
let mut info = Cache::get(self.disk_info_cache.clone()).await?;
|
let mut info = Cache::get(self.disk_info_cache.clone()).await?;
|
||||||
// TODO: nr_requests, rotational
|
|
||||||
info.nr_requests = self.nrrequests;
|
info.nr_requests = self.nrrequests;
|
||||||
info.rotational = self.rotational;
|
info.rotational = self.rotational;
|
||||||
info.mount_path = self.path().to_str().unwrap().to_string();
|
info.mount_path = self.path().to_str().unwrap().to_string();
|
||||||
@@ -3719,6 +3718,8 @@ mod test {
|
|||||||
assert!(!disk_info.fs_type.is_empty(), "fs_type should not be empty on this platform");
|
assert!(!disk_info.fs_type.is_empty(), "fs_type should not be empty on this platform");
|
||||||
assert!(disk_info.total > 0);
|
assert!(disk_info.total > 0);
|
||||||
assert!(disk_info.free <= disk_info.total);
|
assert!(disk_info.free <= disk_info.total);
|
||||||
|
assert_eq!(disk_info.nr_requests, disk.nrrequests);
|
||||||
|
assert_eq!(disk_info.rotational, disk.rotational);
|
||||||
assert!(!disk_info.mount_path.is_empty());
|
assert!(!disk_info.mount_path.is_empty());
|
||||||
assert!(!disk_info.endpoint.is_empty());
|
assert!(!disk_info.endpoint.is_empty());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user