From 46a372d5d73e3b600944489cc210163368eada2f Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Thu, 28 Dec 2023 15:27:23 +0100 Subject: feat(tvix/castore/fs): instrument FuseDaemon functions Change-Id: I696b7ab6b4c08004db147c0fda7312bbebaa0eec Reviewed-on: https://cl.tvl.fyi/c/depot/+/10451 Autosubmit: flokli Reviewed-by: raitobezarius Tested-by: BuildkiteCI --- tvix/castore/src/fs/fuse.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tvix/castore/src/fs/fuse.rs') diff --git a/tvix/castore/src/fs/fuse.rs b/tvix/castore/src/fs/fuse.rs index 98793bf47d..1dce439159 100644 --- a/tvix/castore/src/fs/fuse.rs +++ b/tvix/castore/src/fs/fuse.rs @@ -1,7 +1,7 @@ use std::{io, path::Path, sync::Arc, thread}; use fuse_backend_rs::{api::filesystem::FileSystem, transport::FuseSession}; -use tracing::error; +use tracing::{error, instrument}; struct FuseServer where @@ -52,10 +52,11 @@ pub struct FuseDaemon { } impl FuseDaemon { + #[instrument(skip(fs, mountpoint), fields(mountpoint=?mountpoint), err)] pub fn new(fs: FS, mountpoint: P, threads: usize) -> Result where FS: FileSystem + Sync + Send + 'static, - P: AsRef, + P: AsRef + std::fmt::Debug, { let server = Arc::new(fuse_backend_rs::api::server::Server::new(Arc::new(fs))); @@ -89,6 +90,7 @@ impl FuseDaemon { }) } + #[instrument(skip_all, err)] pub fn unmount(&mut self) -> Result<(), io::Error> { self.session .umount() -- cgit 1.4.1