Fix reads for blocks freed after being cloned#18724
Open
amotin wants to merge 1 commit into
Open
Conversation
14 tasks
nbdd0121
reviewed
Jul 1, 2026
PR openzfs#18421 fixed a case when reads for blocks cloned after being freed could return zeroes. But it created an opposite problem, when reads for blocks freed after being cloned could return non- zero content from the cloning. This patch should fix the problem by creating a more specialized form of dnode_block_freed(), taking into account the TXG when the cloning has happened and checking frees only in TXGs after. Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Fixes: openzfs#18421
Contributor
|
Do you have a test program so that I can run some red/green testing? |
Member
Author
No, I don't. I wonder if you could invert your test or make it bidirectional. |
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.
PR #18421 fixed a case when reads for blocks cloned after being freed could return zeroes. But it created an opposite problem, when reads for blocks freed after being cloned could return non- zero content from the cloning.
This patch should fix the problem by creating a more specialized form of
dnode_block_freed(), taking into account the TXG when the cloning has happened and checking frees only in TXGs after.Fixes: #18421
How Has This Been Tested?
Not really.
Types of changes
Checklist:
Signed-off-by.