Skip to content

Reduce FUSE transport log level.#225

Merged
imeoer merged 2 commits intocloud-hypervisor:masterfrom
georgyo:adjust-log-level
Mar 26, 2026
Merged

Reduce FUSE transport log level.#225
imeoer merged 2 commits intocloud-hypervisor:masterfrom
georgyo:adjust-log-level

Conversation

@georgyo
Copy link
Copy Markdown

@georgyo georgyo commented Mar 19, 2026

The FUSE init flags are unlikely to be of use unless one is debugging a problem with the filesystem.

The messages about channel status get printed for every thread, and it's rather confusing for end-users to have a FUSE filesystem terminate with:

fuse filesystem umounted
FUSE channel already closed!
FUSE channel already closed!
FUSE channel already closed!
FUSE channel already closed!
FUSE channel already closed!
FUSE channel already closed!

...when everything went well.

NOTE: This is a rebase of #200

The FUSE init flags are unlikely to be of use unless one is debugging a problem
with the filesystem.

The messages about channel status get printed for every thread, and it's rather
confusing for end-users to have a FUSE filesystem terminate with:

fuse filesystem umounted
FUSE channel already closed!
FUSE channel already closed!
FUSE channel already closed!
FUSE channel already closed!
FUSE channel already closed!
FUSE channel already closed!

...when everything went well.
info!(
debug!(
"FUSE INIT major {} minor {}\n in_opts: {:?}\nout_opts: {:?}",
major, minor, capable, enabled
Copy link
Copy Markdown
Collaborator

@imeoer imeoer Mar 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but in real-world usage scenario, we'd like this info (Business processe usually only enable info-level logging) to always be visible to make it easier to debug fuse-related issues across different kernels.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make more sense to expose this somewhere via some getter and then have that application log it explicitly?

See my question regarding that on #195 (comment)

Logging this with info level is surprising for library consumers, and confusing for end users. It really should be exposed through some getter, if you want to print these values explicitly from one application.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I think it's reasonable to provide a getter so that the business process can print it as needed.

@flokli flokli mentioned this pull request Mar 24, 2026
@flokli
Copy link
Copy Markdown
Contributor

flokli commented Mar 24, 2026

I collaborated with @georgyo on this PR, it's extended to now use the MetricHook machinery to allow inspecting connection parameters. PTAL!

@imeoer
Copy link
Copy Markdown
Collaborator

imeoer commented Mar 25, 2026

@flokli It seems have a broken CI here :)

This allows reporting back connection parameters from init(), so it can
be logged /inspected by applications.

It comes with an empty no-op implementation to make this a non-breaking
change.
@flokli flokli force-pushed the adjust-log-level branch from b142898 to 0566b2b Compare March 25, 2026 12:29
@flokli
Copy link
Copy Markdown
Contributor

flokli commented Mar 25, 2026

@flokli It seems have a broken CI here :)

Looks like I missed cargo test --all-features. Updated, sorry.

I see some failures in cargo test ("Operation not permitted", plus a "assertion failed: fs.fsyncdir(&ctx, ROOT_ID, false, 0).is_ok()"), but I assume this is due to my setup here and unrelated to this PR.

Copy link
Copy Markdown
Collaborator

@imeoer imeoer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@imeoer imeoer merged commit e922339 into cloud-hypervisor:master Mar 26, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants