From 3111b0997fa0a298bc9b5b312c32c88d9632d17c Mon Sep 17 00:00:00 2001 From: Han Xiaoyang Date: Fri, 25 Jul 2025 17:22:45 +0800 Subject: [PATCH 1/3] [scorpio]:Fix the incorrect placement of the MR layer Signed-off-by: Han Xiaoyang --- scorpio/src/daemon/mod.rs | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/scorpio/src/daemon/mod.rs b/scorpio/src/daemon/mod.rs index 740bd15ee..f6acccbdc 100644 --- a/scorpio/src/daemon/mod.rs +++ b/scorpio/src/daemon/mod.rs @@ -173,8 +173,12 @@ async fn mount_handler( }); } + + // fetch the dionary node info from mono. + let work_dir = fetch(&mut ml, inode, mono_path).await.unwrap(); + let store_path = PathBuf::from(store_path).join(&work_dir.hash); if let Some(m) = &req.mr { - let mr_store_path = PathBuf::from(store_path).join("mr"); + let mr_store_path = PathBuf::from(&store_path).join("mr"); // if mr is provided, we need to fetch the mr info from mono. if let Err(e) = mr::build_mr_layer(m, mr_store_path).await { return axum::Json(MountResponse { @@ -185,16 +189,18 @@ async fn mount_handler( } } - // fetch the dionary node info from mono. - let work_dir = fetch(&mut ml, inode, mono_path).await.unwrap(); - - let store_path = PathBuf::from(store_path).join(&work_dir.hash); // checkout / mount this dictionary. - - let _ = state + if let Err(e) = state .fuse .overlay_mount(inode, store_path, req.mr.is_some()) - .await; + .await + { + return axum::Json(MountResponse { + status: FAIL.into(), + mount: MountInfo::default(), + message: format!("Mount process error :{e}."), + }); + } let mount_info = MountInfo { hash: work_dir.hash, From 3eef2c316c1a4b43a72eff05867ebc13b39dbd4c Mon Sep 17 00:00:00 2001 From: Lux1an Date: Fri, 25 Jul 2025 17:25:17 +0800 Subject: [PATCH 2/3] Update scorpio/src/daemon/mod.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Lux1an --- scorpio/src/daemon/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scorpio/src/daemon/mod.rs b/scorpio/src/daemon/mod.rs index f6acccbdc..2a3a443ba 100644 --- a/scorpio/src/daemon/mod.rs +++ b/scorpio/src/daemon/mod.rs @@ -174,7 +174,7 @@ async fn mount_handler( } - // fetch the dionary node info from mono. + // fetch the dictionary node info from mono. let work_dir = fetch(&mut ml, inode, mono_path).await.unwrap(); let store_path = PathBuf::from(store_path).join(&work_dir.hash); if let Some(m) = &req.mr { From d714730aa60ad5d21aaadbef55f70155526f5331 Mon Sep 17 00:00:00 2001 From: Lux1an Date: Fri, 25 Jul 2025 17:25:27 +0800 Subject: [PATCH 3/3] Update scorpio/src/daemon/mod.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Lux1an --- scorpio/src/daemon/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scorpio/src/daemon/mod.rs b/scorpio/src/daemon/mod.rs index 2a3a443ba..4652deb66 100644 --- a/scorpio/src/daemon/mod.rs +++ b/scorpio/src/daemon/mod.rs @@ -198,7 +198,7 @@ async fn mount_handler( return axum::Json(MountResponse { status: FAIL.into(), mount: MountInfo::default(), - message: format!("Mount process error :{e}."), + message: format!("Mount process error: {e}."), }); }