diff options
author | Florian Klink <flokli@flokli.de> | 2023-12-28T14·27+0100 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2023-12-29T15·57+0000 |
commit | 46a372d5d73e3b600944489cc210163368eada2f (patch) | |
tree | 227a1902f4d9da371fe587bba190f9449ff1ac2e /tvix/castore | |
parent | 0af445c2f4fc274facf520bed2f00a048773604f (diff) |
feat(tvix/castore/fs): instrument FuseDaemon functions r/7267
Change-Id: I696b7ab6b4c08004db147c0fda7312bbebaa0eec Reviewed-on: https://cl.tvl.fyi/c/depot/+/10451 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/castore')
-rw-r--r-- | tvix/castore/src/fs/fuse.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tvix/castore/src/fs/fuse.rs b/tvix/castore/src/fs/fuse.rs index 98793bf47d58..1dce43915905 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<FS> where @@ -52,10 +52,11 @@ pub struct FuseDaemon { } impl FuseDaemon { + #[instrument(skip(fs, mountpoint), fields(mountpoint=?mountpoint), err)] pub fn new<FS, P>(fs: FS, mountpoint: P, threads: usize) -> Result<Self, io::Error> where FS: FileSystem + Sync + Send + 'static, - P: AsRef<Path>, + P: AsRef<Path> + 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() |