-
Notifications
You must be signed in to change notification settings - Fork 132
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
FIEMAP fixes for --is-reflink #531
Open
cebtenzzre
wants to merge
6
commits into
sahib:master
Choose a base branch
from
cebtenzzre:fiemap-fixes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
cebtenzzre
force-pushed
the
fiemap-fixes
branch
from
September 25, 2021 18:24
09f79e9
to
36a1f40
Compare
This was
linked to
issues
Aug 9, 2022
Test exit statuses 1, 3, 4, 6, 7, 8, and 9.
Completing the current loop iteration if the current extent is not contiguous with the last means the extent flags and file offset are updated as if the extents *were* contiguous. In general, this causes calling code to skip every second extent! Also remove a redundant write to file_offset_next that is always clobbered after the loop exits. Fixes sahib#527
There were two EOF checks in rm_util_link_type. One of them caused the last extent to be ignored in files with at least two extents. The other mishandled files that end with a hole. In rm_offset_get_from_fd, always warn about no extents at a nonzero file offset, since calling code should stop after the last extent. Fixes sahib#528
Holes are represented by logical gaps in the FIEMAP mapping. Summing the extent lengths to get a file offset causes file_offset to get out of sync. If the hole is smaller than the following extent, the next few FIEMAP calls may return the same extent. Fixes sahib#529
Holes are handled by ignoring them when they are after an extent and skipping them when they are before one. Since we were only comparing the current file position, a file with a hole could match a file without one as long as the physical offsets match and the extents logically end at the same place. This led to --is-reflink false-positives. Fix this by comparing the logical offset of each extent. Fixes sahib#611
cebtenzzre
force-pushed
the
fiemap-fixes
branch
from
February 24, 2023 03:41
36a1f40
to
50c3142
Compare
rmlint previously ignored holes between physically adjacent extents. This could cause files to be detected as reflinked that weren't, if one file had a complete extent and the other file had two pieces of it separated by a hole. Check for logical gaps as well as physical gaps to fix this problem. Fixes sahib#530
cebtenzzre
force-pushed
the
fiemap-fixes
branch
from
February 26, 2023 19:11
50c3142
to
e7b3f5f
Compare
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.
This pull request is intended to fix the FIEMAP-related issues with --is-reflink: #527, #528, #529, and #530.