Skip to content

Commit 8c3b49a

Browse files
eryugeybergwolf
authored andcommitted
passthroughfs: remove trace log in hot path
lookup() and forget() are two hot paths, we see performance hit even if trace log is not enabled. So remove trace log in hot paths. Signed-off-by: Eryu Guan <[email protected]>
1 parent 48e7f75 commit 8c3b49a

File tree

2 files changed

+0
-30
lines changed

2 files changed

+0
-30
lines changed

src/passthrough/async_io.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -379,11 +379,6 @@ impl<S: BitmapSlice + Send + Sync> AsyncFileSystem for PassthroughFs<S> {
379379
// and results in EBADF.
380380
match InodeMap::get_alt_locked(inodes.deref(), &ids_altkey, handle_altkey.as_ref()) {
381381
Some(data) => {
382-
trace!(
383-
"fuse: do_lookup sees existing inode {} ids_altkey {:?}",
384-
data.inode,
385-
ids_altkey
386-
);
387382
data.refcount.fetch_add(1, Ordering::Relaxed);
388383
data.inode
389384
}
@@ -396,12 +391,6 @@ impl<S: BitmapSlice + Send + Sync> AsyncFileSystem for PassthroughFs<S> {
396391
format!("max inode number reached: {}", VFS_MAX_INO),
397392
));
398393
}
399-
trace!(
400-
"fuse: do_lookup adds new inode {} ids_altkey {:?} handle_altkey {:?}",
401-
inode,
402-
ids_altkey,
403-
handle_altkey
404-
);
405394
406395
InodeMap::insert_locked(
407396
inodes.deref_mut(),

src/passthrough/mod.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -939,11 +939,6 @@ impl<S: BitmapSlice + Send + Sync> PassthroughFs<S> {
939939
// and results in EBADF.
940940
match InodeMap::get_alt_locked(inodes.deref(), &ids_altkey, handle_opt) {
941941
Some(data) => {
942-
trace!(
943-
"fuse: do_lookup sees existing inode {} ids_altkey {:?}",
944-
data.inode,
945-
ids_altkey
946-
);
947942
data.refcount.fetch_add(1, Ordering::Relaxed);
948943
data.inode
949944
}
@@ -956,12 +951,6 @@ impl<S: BitmapSlice + Send + Sync> PassthroughFs<S> {
956951
format!("max inode number reached: {VFS_MAX_INO}"),
957952
));
958953
}
959-
trace!(
960-
"fuse: do_lookup adds new inode {} ids_altkey {:?} handle {:?}",
961-
inode,
962-
ids_altkey,
963-
handle_opt,
964-
);
965954

966955
InodeMap::insert_locked(
967956
inodes.deref_mut(),
@@ -1012,14 +1001,6 @@ impl<S: BitmapSlice + Send + Sync> PassthroughFs<S> {
10121001
// we don't want misbehaving clients to cause integer overflow.
10131002
let new = curr.saturating_sub(count);
10141003

1015-
trace!(
1016-
"fuse: forget inode {} refcount {}, count {}, new_count {}",
1017-
inode,
1018-
curr,
1019-
count,
1020-
new
1021-
);
1022-
10231004
// Synchronizes with the acquire load in `do_lookup`.
10241005
if data
10251006
.refcount

0 commit comments

Comments
 (0)