From e437d42d314e5f19bb116bd4625ae4ed083c000c Mon Sep 17 00:00:00 2001 From: weisd Date: Tue, 23 Dec 2025 09:54:11 +0800 Subject: [PATCH] merge main --- crates/ecstore/src/disk/disk_store.rs | 12 +++++++++++- rustfs/src/main.rs | 5 +---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/crates/ecstore/src/disk/disk_store.rs b/crates/ecstore/src/disk/disk_store.rs index 3ccd8c7d..d9ecaf84 100644 --- a/crates/ecstore/src/disk/disk_store.rs +++ b/crates/ecstore/src/disk/disk_store.rs @@ -15,7 +15,8 @@ use crate::disk::{ CheckPartsResp, DeleteOptions, DiskAPI, DiskError, DiskInfo, DiskInfoOptions, DiskLocation, Endpoint, Error, FileInfoVersions, ReadMultipleReq, ReadMultipleResp, ReadOptions, RenameDataResp, Result, UpdateMetadataOpts, VolumeInfo, - WalkDirOptions, local::LocalDisk, + WalkDirOptions, + local::{LocalDisk, ScanGuard}, }; use bytes::Bytes; use rustfs_filemeta::{FileInfo, ObjectPartInfo, RawFileInfo}; @@ -475,6 +476,15 @@ impl LocalDiskWrapper { #[async_trait::async_trait] impl DiskAPI for LocalDiskWrapper { + async fn read_metadata(&self, volume: &str, path: &str) -> Result { + self.track_disk_health(|| async { self.disk.read_metadata(volume, path).await }, Duration::ZERO) + .await + } + + fn start_scan(&self) -> ScanGuard { + self.disk.start_scan() + } + fn to_string(&self) -> String { self.disk.to_string() } diff --git a/rustfs/src/main.rs b/rustfs/src/main.rs index af6488f5..58b55a2f 100644 --- a/rustfs/src/main.rs +++ b/rustfs/src/main.rs @@ -33,10 +33,7 @@ use crate::server::{ use chrono::Datelike; use clap::Parser; use license::init_license; -use rustfs_ahm::{ - Scanner, create_ahm_services_cancel_token, heal::storage::ECStoreHealStorage, init_heal_manager, - scanner::data_scanner::ScannerConfig, shutdown_ahm_services, -}; +use rustfs_ahm::{create_ahm_services_cancel_token, heal::storage::ECStoreHealStorage, init_heal_manager, shutdown_ahm_services}; use rustfs_common::globals::set_global_addr; use rustfs_ecstore::{ StorageAPI,