fuse: handle U64_MAX correctly in DLM locked range index#146
Open
hbirth wants to merge 1 commit intoDDNStorage:redfs-ubuntu-noble-6.8.0-58.60from
Open
fuse: handle U64_MAX correctly in DLM locked range index#146hbirth wants to merge 1 commit intoDDNStorage:redfs-ubuntu-noble-6.8.0-58.60from
hbirth wants to merge 1 commit intoDDNStorage:redfs-ubuntu-noble-6.8.0-58.60from
Conversation
963c63f to
5126d9a
Compare
bsbernd
reviewed
Apr 23, 2026
| while (node) { | ||
| range = rb_entry(node, struct fuse_dlm_range, rb); | ||
| if (range->end >= start - 1) | ||
| if (start == 0 || range->end >= start - 1) |
Collaborator
There was a problem hiding this comment.
Only quickly reading through it, what is if the rb_entry range is outside of the start/end window? Like start=0, end=1, but range->start=10, range->end=11?
Collaborator
Author
There was a problem hiding this comment.
the first range will do then (when start == 0 WE are the first range and there can be nothing before) ... try to merge that ... in your example that will fail ... we move on.
Collaborator
Author
There was a problem hiding this comment.
Those (end+1) and (start-1) are to detect adjacent ranges so that we grow them and not end up with huge trees
When merging and checking overlap U64_MAX was not handled this will create problems on multiple DLM results that cover the whole range. Add a fast path for adding and checking locked ranges when the whole range is covered. Refactor dlm range handling to make it more readable. Signed-off-by: Horst Birthelmer <[email protected]>
5126d9a to
bb2afd4
Compare
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.
When merging and checking overlap U64_MAX was not handled this will create problems on multiple DLM results that cover the whole range.
Add a fast path for adding and checking locked ranges when the whole range is covered.