Skip to content

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
hbirth:redfs-ubuntu-noble-6.8.0-58.60
Open

fuse: handle U64_MAX correctly in DLM locked range index#146
hbirth wants to merge 1 commit intoDDNStorage:redfs-ubuntu-noble-6.8.0-58.60from
hbirth:redfs-ubuntu-noble-6.8.0-58.60

Conversation

@hbirth
Copy link
Copy Markdown
Collaborator

@hbirth hbirth commented Apr 22, 2026

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.

@hbirth hbirth force-pushed the redfs-ubuntu-noble-6.8.0-58.60 branch 2 times, most recently from 963c63f to 5126d9a Compare April 23, 2026 09:08
Comment thread fs/fuse/fuse_dlm_cache.c
while (node) {
range = rb_entry(node, struct fuse_dlm_range, rb);
if (range->end >= start - 1)
if (start == 0 || range->end >= start - 1)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]>
@hbirth hbirth force-pushed the redfs-ubuntu-noble-6.8.0-58.60 branch from 5126d9a to bb2afd4 Compare April 23, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants