Skip to content

Commit

Permalink
wip: show file / dir name in log
Browse files Browse the repository at this point in the history
  • Loading branch information
unknowntpo committed Jan 9, 2025
1 parent 19d34cb commit 3defb39
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions clients/filesystem-fuse/src/fuse_api_handle_debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ impl<T: RawFileSystem> Filesystem for FuseApiHandleDebug<T> {
}

async fn lookup(&self, req: Request, parent: Inode, name: &OsStr) -> fuse3::Result<ReplyEntry> {
debug!(req.unique, ?req, ?parent, ?name, "lookup started");
let parent_stat = self.inner.get_modified_file_stat(parent, Option::None, Option::None, Option::None).await?;
debug!(req.unique, ?req, parent = ?parent_stat.name, ?name, "lookup started");

match self.inner.lookup(req, parent, name).await {
Ok(reply) => {
debug!(req.unique, ?reply, "lookup completed");
Expand All @@ -138,7 +140,9 @@ impl<T: RawFileSystem> Filesystem for FuseApiHandleDebug<T> {
fh: Option<u64>,
flags: u32,
) -> fuse3::Result<ReplyAttr> {
debug!(req.unique, ?req, ?inode, ?fh, ?flags, "getattr started");
let stat = self.inner.get_modified_file_stat(inode, Option::None, Option::None, Option::None).await?;
debug!(req.unique, ?req, inode = ?stat.name, ?fh, ?flags, "getattr started");

match self.inner.getattr(req, inode, fh, flags).await {
Ok(reply) => {
// FIXME: reply: ReplyAttr should be formatted in human readable way
Expand All @@ -159,7 +163,9 @@ impl<T: RawFileSystem> Filesystem for FuseApiHandleDebug<T> {
fh: Option<u64>,
set_attr: SetAttr,
) -> fuse3::Result<ReplyAttr> {
debug!(req.unique, ?req, ?inode, ?fh, ?set_attr, "setattr started");
let stat = self.inner.get_modified_file_stat(inode, Option::None, Option::None, Option::None).await?;
debug!(req.unique, ?req, inode = ?stat.name, ?fh, ?set_attr, "setattr started");

match self.inner.setattr(req, inode, fh, set_attr).await {
Ok(reply) => {
debug!(req.unique, ?reply, "setattr completed");
Expand Down

0 comments on commit 3defb39

Please sign in to comment.