-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#5873] feat(gvfs-fuse): add debug log for FuseApiHandle #5905
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
file_mask = 0o600 | ||
dir_mask = 0o700 | ||
fs_type = "memory" | ||
fuse_debug = true | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keep the format |
||
[fuse.properties] | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
use crate::error::ErrorCode::{ConfigNotFound, InvalidConfig}; | ||
use crate::utils::GvfsResult; | ||
use config::{builder, Config}; | ||
use log::{error, info, warn}; | ||
use tracing::{error, info, warn}; | ||
use serde::Deserialize; | ||
use std::collections::HashMap; | ||
use std::fs; | ||
|
@@ -265,6 +265,8 @@ pub struct FuseConfig { | |
#[serde(default)] | ||
pub fs_type: String, | ||
#[serde(default)] | ||
pub fuse_debug: bool, | ||
#[serde(default)] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to handle default value like other configurations. |
||
pub config_path: String, | ||
#[serde(default)] | ||
pub properties: HashMap<String, String>, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ impl<T: RawFileSystem> FuseApiHandle<T> { | |
} | ||
} | ||
|
||
async fn get_modified_file_stat( | ||
pub async fn get_modified_file_stat( | ||
&self, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't use this function to retrieve the file name. use the |
||
file_id: u64, | ||
size: Option<u64>, | ||
|
@@ -64,15 +64,15 @@ impl<T: RawFileSystem> FuseApiHandle<T> { | |
|
||
if let Some(size) = size { | ||
file_stat.size = size; | ||
}; | ||
} | ||
|
||
if let Some(atime) = atime { | ||
file_stat.atime = atime; | ||
}; | ||
} | ||
|
||
if let Some(mtime) = mtime { | ||
file_stat.mtime = mtime; | ||
}; | ||
} | ||
|
||
Ok(file_stat) | ||
} | ||
|
@@ -117,6 +117,7 @@ impl<T: RawFileSystem> Filesystem for FuseApiHandle<T> { | |
} | ||
|
||
let file_stat = self.fs.stat(inode).await?; | ||
|
||
Ok(ReplyAttr { | ||
ttl: self.default_ttl, | ||
attr: fstat_to_file_attr(&file_stat, &self.fs_context), | ||
|
@@ -256,7 +257,7 @@ impl<T: RawFileSystem> Filesystem for FuseApiHandle<T> { | |
} | ||
|
||
type DirEntryStream<'a> | ||
= BoxStream<'a, fuse3::Result<DirectoryEntry>> | ||
= BoxStream<'a, fuse3::Result<DirectoryEntry>> | ||
where | ||
T: 'a; | ||
|
||
|
@@ -336,7 +337,7 @@ impl<T: RawFileSystem> Filesystem for FuseApiHandle<T> { | |
} | ||
|
||
type DirEntryPlusStream<'a> | ||
= BoxStream<'a, fuse3::Result<DirectoryEntryPlus>> | ||
= BoxStream<'a, fuse3::Result<DirectoryEntryPlus>> | ||
where | ||
T: 'a; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to use
tracing
instead oflog
, please removelog
.