fix: bug crash when disk drop

This commit is contained in:
weisd
2024-12-12 09:54:06 +08:00
parent 7d2c9b06de
commit 0552254c23
6 changed files with 31 additions and 6 deletions
+2
View File
@@ -247,6 +247,7 @@ impl LocalDisk {
true
}
#[tracing::instrument(level = "debug", skip(self))]
async fn check_format_json(&self) -> Result<Metadata> {
let md = fs::metadata(&self.format_path).await.map_err(|e| match e.kind() {
ErrorKind::NotFound => DiskError::DiskNotFound,
@@ -801,6 +802,7 @@ impl DiskAPI for LocalDisk {
}
}
#[tracing::instrument(level = "debug", skip(self))]
async fn get_disk_id(&self) -> Result<Option<Uuid>> {
let mut format_info = self.format_info.write().await;