-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
leaf node deletion in range tree #11044
Labels
Type: Defect
Incorrect behavior (e.g. crash, hang)
Comments
@pcd1193182, could you take a look at this? |
This is a bug; filing a PR to fix it now. |
pcd1193182
added
Type: Defect
Incorrect behavior (e.g. crash, hang)
and removed
Type: Question
Issue for discussion
labels
Oct 13, 2020
12 tasks
behlendorf
pushed a commit
that referenced
this issue
Oct 14, 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
behlendorf
pushed a commit
that referenced
this issue
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 issue
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 issue
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
Ask your question!
After removing a range section, the parameter rs structure may contain an invalid value. Therefore, could not reference it later.
in range_tree_add_impl function, call rs = zfs_btree_find(&rt->rt_root, &rsearch, &where) to get rs, if rs not empth, and gap is true, it may call zfs_btree_remove to delete this rs first. if this causes whole leaf deletion, the rs may point to invalid value. Further using rs will cause error such as range_tree_stat_decr(rt, rs);
Which portion of the codebase does your question involve?
Additional context
The text was updated successfully, but these errors were encountered: