-
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
--is-reflink detects EOF poorly #528
Labels
Comments
This was referenced Sep 16, 2021
cebtenzzre
added a commit
to cebtenzzre/rmlint
that referenced
this issue
Sep 16, 2021
There were two EOF checks in rm_reflink_type_from_fd. 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
cebtenzzre
added a commit
to cebtenzzre/rmlint
that referenced
this issue
Sep 25, 2021
There were two EOF checks in rm_reflink_type_from_fd. 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
cebtenzzre
added a commit
to cebtenzzre/rmlint
that referenced
this issue
Sep 28, 2021
There were two EOF checks in rm_reflink_type_from_fd. 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
cebtenzzre
added a commit
to cebtenzzre/rmlint
that referenced
this issue
Aug 7, 2022
There were two EOF checks in rm_reflink_type_from_fd. 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
cebtenzzre
added a commit
to cebtenzzre/rmlint
that referenced
this issue
Sep 18, 2022
There were two EOF checks in rm_reflink_type_from_fd. 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
cebtenzzre
added a commit
to cebtenzzre/rmlint
that referenced
this issue
Feb 24, 2023
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
intelfx
pushed a commit
to intelfx/rmlint
that referenced
this issue
Mar 9, 2023
There were two EOF checks in rm_reflink_type_from_fd. 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
intelfx
pushed a commit
to intelfx/rmlint
that referenced
this issue
Mar 9, 2023
There were two EOF checks in rm_reflink_type_from_fd. 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
rmlint --is-reflink ignores the physical offset of the last extent in a file, as long as there are at least two extents total, even if a fix for #527 is applied.
Steps to reproduce
Build rmlint from the develop branch with _RM_OFFSET_DEBUG=1 and a fix for #527 applied.
For testcase 1, run these commands:
For testcase 2, run these commands:
Actual result
Testcase 1
rmlint prints "Reflink" and exits with status 0.
It checks the first extent's offset, but ignores the second.
Testcase 2
rmlint prints "An error occurred during checking" and exits with status 1.
It reports "got no extents" twice.
Expected result
Testcase 1
rmlint prints "Not linked" and exits with status 11.
There should be a message like
DEBUG: Physical offsets differ at byte 102400: 694077128704<> 694103236608
.Testcase 2
rmlint prints "Reflink" and exits with status 0.
There should be only one rm_offset_get_fiemap call per file.
Versions
rmlint version 2.10.1 built from develop commit bdb591f, with _RM_OFFSET_DEBUG=1 and a fix for #527 applied.
The text was updated successfully, but these errors were encountered: