Page MenuHomeFreeBSD

fusefs: add a regression test for a cluster_read bug
ClosedPublic

Authored by asomers on Jul 14 2025, 11:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 1, 6:13 PM
Unknown Object (File)
Sun, Mar 1, 5:51 PM
Unknown Object (File)
Sun, Mar 1, 6:34 AM
Unknown Object (File)
Thu, Feb 19, 9:17 AM
Unknown Object (File)
Wed, Feb 18, 4:57 PM
Unknown Object (File)
Wed, Feb 18, 3:30 PM
Unknown Object (File)
Feb 1 2026, 10:59 AM
Unknown Object (File)
Feb 1 2026, 10:55 AM
Subscribers

Details

Summary

If VOP_BMAP returns an error during readahead, cluster_read will fail
the read, even though the actually requested data was read just fine.

This commit includes the regression test only. The solution is under
review at https://reviews.freebsd.org/D51254 .

PR: 264196
Reported by: danfe

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 65435
Build 62318: arc lint + arc unit

Event Timeline

Would you like me to check if the test really fails on an unpatched system?

tests/sys/fs/fusefs/bmap.cc
264

How about checking 4 identical reads? Just in case the failure having a pattern "OK FAIL OK FAIL".

Would you like me to check if the test really fails on an unpatched system?

I already have, and it really does fail.

@arrowd now that you've committed the main bmap patch, are you ok with this test?

I had to learn a bit about gmock to properly review this. LGTM, FWIW.

This revision is now accepted and ready to land.Oct 23 2025, 1:34 PM