Page MenuHomeFreeBSD

fusefs: improve warnings about buggy FUSE servers
ClosedPublic

Authored by asomers on Jun 15 2021, 9:41 PM.

Details

Summary

The fusefs driver will print warning messages about FUSE servers that
commit protocol violations. Previously it would print those warnings on
every violation, but that could spam the console. Now it will print
each warning no more than once per lifetime of the mount. There is also
now a dtrace probe for each violation.

MFC after: 2 weeks
Sponsored by: Axcient

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

This revision is now accepted and ready to land.Jun 16 2021, 6:01 PM

I like this idea.

I'd like us to apply the same concept to the Linuxulator, for similar types of warnings (although in Linuxulator the spammy warnings are for unimplemented kernel functionality).

sys/fs/fuse/fuse_internal.c
917–918

This change seems to be un-style(9)ing

sys/fs/fuse/fuse_ipc.h
235–239

might we end up with enough distinct warnings to run out of flag bits?
(just add a second flags field if/when that happens?)

asomers added inline comments.
sys/fs/fuse/fuse_internal.c
917–918

Ok, I'll revert this line.

sys/fs/fuse/fuse_ipc.h
235–239

Yep, but the flags field never leaves this module. So we can add more fields or reassign bits at will.

emaste added inline comments.
sys/fs/fuse/fuse_ipc.h
235–239

Ok, fair enough.

This revision was automatically updated to reflect the committed changes.
asomers marked 2 inline comments as done.