diff --git a/fuse-pipe/src/protocol/request.rs b/fuse-pipe/src/protocol/request.rs index 366833df..f5f686cd 100644 --- a/fuse-pipe/src/protocol/request.rs +++ b/fuse-pipe/src/protocol/request.rs @@ -457,9 +457,10 @@ impl VolumeRequest { | Self::Setlk { fh, .. } | Self::Readdirplus { fh, .. } => *fh = new_fh, Self::Setattr { fh, .. } => *fh = Some(new_fh), - // Only remap fh_in; fh_out references a different file and must be - // remapped separately if it's also stale (the EBADF retry in RemapFs - // handles one handle at a time via fh()). + // Only remap fh_in; fh_out references a different file and is NOT + // currently remapped after snapshot restore. This is a known limitation: + // copy_file_range/remap_file_range with a stale fh_out will fail. + // TODO: add fh_out()/with_fh_out() helpers for independent remapping. Self::CopyFileRange { fh_in, .. } | Self::RemapFileRange { fh_in, .. } => { *fh_in = new_fh; } diff --git a/fuse-pipe/src/server/remap.rs b/fuse-pipe/src/server/remap.rs index 57394644..d065d750 100644 --- a/fuse-pipe/src/server/remap.rs +++ b/fuse-pipe/src/server/remap.rs @@ -539,7 +539,10 @@ impl RemapFs { let table: std::collections::BTreeMap = match serde_json::from_str(json) { Ok(t) => t, Err(e) => { - error!("failed to parse inode table JSON, starting with empty table: {}", e); + error!( + "failed to parse inode table JSON, starting with empty table: {}", + e + ); std::collections::BTreeMap::new() } };