Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect deletion order in range_tree_add_impl gap case #11056

Merged
merged 1 commit into from
Oct 14, 2020

Conversation

pcd1193182
Copy link
Contributor

This addresses issue #11044

Motivation and Context

After a side-effectful call like add or remove, references to range segs stored in btrees can no longer be used safely.

Description

We move the remove call to just before the reinsertion call so that the seg remains valid for as long as we need it.

How Has This Been Tested?

zfs-precommit run

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Oct 13, 2020
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Oct 14, 2020
@behlendorf behlendorf merged commit 6a60ef8 into openzfs:master Oct 14, 2020
behlendorf pushed a commit that referenced this pull request Oct 16, 2020
After a side-effectful call like add or remove, references to range
segs stored in btrees can no longer be used safely.  We move the
remove call to just before the reinsertion call so that the seg
remains valid for as long as we need it.

Reviewed-by: Matthew Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Paul Dagnelie <[email protected]>
Closes #11044
Closes #11056
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
After a side-effectful call like add or remove, references to range 
segs stored in btrees can no longer be used safely.  We move the 
remove call to just before the reinsertion call so that the seg 
remains valid for as long as we need it.

Reviewed-by: Matthew Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Paul Dagnelie <[email protected]>
Closes openzfs#11044 
Closes openzfs#11056
sempervictus pushed a commit to sempervictus/zfs that referenced this pull request May 31, 2021
After a side-effectful call like add or remove, references to range 
segs stored in btrees can no longer be used safely.  We move the 
remove call to just before the reinsertion call so that the seg 
remains valid for as long as we need it.

Reviewed-by: Matthew Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Paul Dagnelie <[email protected]>
Closes openzfs#11044 
Closes openzfs#11056
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants