Repository navigation
Linux 6.17: fuse: add tracepoints for i_size changes, writeback ranges and READ replies - #268
Merged
hbirth merged 1 commit intoOct 16, 2026
Conversation
…eplies
Under DLM with the writeback cache, i_size is only this node's view of
the file, and whether writeback treats bytes as past EOF depends on
what i_size was at that exact moment. When RED-51747 lost another
node's bytes to zeroes, the local i_size at writeback had to be
reconstructed from the order of DLM grants, because nothing records it.
Add three tracepoints:
fuse_isize_change every i_size change and why: the cached-write
extension claim, its retraction, or a size
taken from an attribute reply
fuse_writeback_range each writeback chunk with pos, len, bytes sent,
iomap's end_pos and the current i_size
fuse_readfolio_reply each fuse_do_readfolio() READ with the length
asked, the bytes returned and i_size
With these, the RED-51747 race shows up directly as a writeback chunk
whose end_pos is below i_size while its whole block is sent, preceded
by a READ reply that returned bytes past the local EOF.
Signed-off-by: Sven Oehme <soehme@ddn.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hbirth
force-pushed
the
red-51747-fuse-tracepoints-6.17
branch
from
October 16, 2026 09:03
c54f263 to
17c0972
Compare
hbirth
merged commit Oct 16, 2026
f7cb6f4
into
redfs-ubuntu-hwe-6.17.0-16.16-24.04.1
2 checks passed
Author
|
Post-merge check on tyan-h3-u24: the deployed redfs.ko (DKMS 🤖 Generated with Claude Code |
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.
Diagnostics only, no behaviour change. Tracepoints that would have made RED-51747 (write-back lost update on a page shared by two writers) visible straight from a trace, instead of reconstructed from DLM grant ordering. Related fixes: #264 (writeback clamp) and #266 (READ reply extends i_size).
Why
Under DLM with the writeback cache, i_size is only this node's view. Whether iomap writeback treats bytes as past EOF, zeroing them and possibly sending them, depends on what i_size was at that moment. In RED-51747 the decisive facts were the lower writer's i_size at writeback, iomap's
end_pos, and that a READ had returned bytes past the local EOF. None of these is recorded today.Tracepoints (
TRACE_SYSTEM fuse)fuse_isize_changewrite_claim,write_retract,attr)fuse_cache_write_iter();fuse_change_attributes_i()when it applies a different server sizefuse_writeback_rangeend_pos, current i_sizefuse_iomap_writeback_range()fuse_readfolio_replyfuse_do_readfolio()The RED-51747 race then shows up as a
fuse_writeback_rangewithend_posbelowi_sizeand the full block sent, after afuse_readfolio_replythat returned bytes past the local EOF. Thesendfield equalslenon this base; with #264 it shows the clamped length (a one-argument change at the call site once both are in).Enable with
echo 1 > /sys/kernel/tracing/events/fuse/enable(or per event). The events cost nothing when disabled; all call sites are in paths that already takefi->lockor do a server round trip.Testing
Compile-tested only: built as the redfs DKMS module (same tree, renamed) against Ubuntu 6.17.0-42 with no warnings. The events have not been exercised at runtime yet.
🤖 Generated with Claude Code