Remove the optimization for zero fill pages after EOF and some other minor bug fixes - #199
Merged
hbirth merged 5 commits intoAug 20, 2026
Conversation
This reverts commit 6462b69. This has to be thought through better since done this way it will make disabling request timeouts impossible since it will take the hung task automaitcally on zero. This led to request terminations during io500 bench testing
The append grant is taken at a sampled i_size, but the exclusive inode lock does not pin it: attribute replies move i_size under fi->lock alone. generic_write_checks() then rewrites ki_pos to the fresher i_size and the write lands past the granted range, dirtying the cache without DLM coverage. The in-gate re-validation checks the stale range and cannot catch it. Request the lock again for the final ki_pos when it moved, and let dlm_pos track it so the in-gate re-validation guards the range the write really lands in. Signed-off-by: Horst Birthelmer <hbirthelmer@ddn.com>
Read-modify-writes of blocks past the server EOF go back to reading: the zero-fill needed fi->server_size verified against every recorded write grant, and the verification GETATTRs are server traffic and complexity the saved READs are not worth. Partial pages of expanding writes will be sent as separate FUSE_WRITE requests instead, which needs no read-modify-write at all. Remove the fi->server_size bound with its grow and shrink sites, the grant verification debt, and the zero-fill in fuse_iomap_read_folio_range(). Signed-off-by: Horst Birthelmer <hbirthelmer@ddn.com>
With the expansion zero-fill gone, every unaligned buffered write under DLM pays a read-modify-write READ per partial page, and past the server EOF that READ returns zero bytes: a wasted round trip for data that cannot exist. The write path cannot tell the wasted READ from a needed one without trusting a bound the grant may predate. Do not complete partial pages at all. Split the buffered write (fuse_dlm_buffered_write()): cache only the page-aligned interior, whole pages need no read-modify-write, and send the unaligned head and tail through the existing writethrough path (fuse_perform_write()). A partial page is written byte-exact and left non-uptodate, so nothing is read and neighbouring writers sharing a boundary page accumulate their bytes on the server. A sub-page write with no aligned interior goes fully through. The DLM write lock is taken over the whole range before i_rwsem, so all chunks are covered, and the pre-claimed i_size extension with its reconciliation keeps working on the chunk total. The read-modify-write path stays functional for the rare unaligned restart of the interior after a faulted user copy. Signed-off-by: Horst Birthelmer <hbirthelmer@ddn.com>
Signed-off-by: Horst Birthelmer <hbirthelmer@ddn.com>
hbirth
force-pushed
the
redfs-ubuntu-hwe-6.17.0-16.16-24.04.1
branch
from
August 20, 2026 11:04
c27b63e to
de4ddbe
Compare
hbirth
merged commit Aug 20, 2026
41b92e4
into
DDNStorage:redfs-ubuntu-hwe-6.17.0-16.16-24.04.1
2 checks passed
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.
No description provided.