Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions scorpio/src/daemon/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,12 @@ async fn mount_handler(
});
}


// 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 {
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 {
Expand All @@ -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,
Expand Down
Loading