Closed
feat(fuse): add max_readahead_kb config; fix clippy::field_reassign_with_default#927
Conversation
…th_default Add fuse.max_readahead_kb config option that: - Writes the Linux BDI sysfs read_ahead_kb entry after mount - Raises the FUSE init max_readahead to match Fix clippy::field_reassign_with_default errors in tests by using struct literal initialization syntax instead of post-construction field assignment.
- Fix doc: sysfs path is read_ahead_kb not max_readahead_kb - Extract BDI_RETRY_COUNT/BDI_RETRY_DELAY_MS constants - Add edge-case tests: not-found, empty, malformed lines, multiple entries
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job build
feat(fuse): add max_readahead_kb config; fix clippy::field_reassign_with_default
Jun 23, 2026
Member
|
@copilot fix merge conflicts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CI "build" job was failing at the clippy step because newly introduced tests used post-construction field assignment on a
Default::default()instance, triggeringclippy::field_reassign_with_default(denied as warning).Root cause
Changes
curvine-common/src/conf/fuse_conf.rsmax_readahead_kb: Option<u32>field with doc comment (sysfs path corrected toread_ahead_kb)Some(0)ininit()— value must be positive when setcurvine-fuse/src/session/bdi.rs(new)/proc/self/mountinfoand writeskbto/sys/class/bdi/<maj>:<min>/read_ahead_kbBDI_RETRY_COUNT×BDI_RETRY_DELAY_MSms for the sysfs entry to appear post-mount; all failures are best-effort (log + continue)curvine-fuse/src/fs/curvine_file_system.rsinit, raisemax_readaheadtomax(negotiated, max_readahead_kb * 1024)so the kernel cap doesn't silently shrink readscurvine-fuse/src/session/fuse_session.rsbdi::apply_max_readahead_kbfor each mount point when the option is setetc/curvine-cluster.toml# max_readahead_kb = 1024option under[fuse]