-
Notifications
You must be signed in to change notification settings - Fork 263
Revert "btrfs-progs: convert: make sure the length of data chunks are also stripe aligned" #1056
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
Open
adam900710
wants to merge
8
commits into
kdave:devel
Choose a base branch
from
adam900710:convert_dev_extent_fix
base: devel
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.
Conversation
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
The update of util library 0.1.3 added aliases of the C API unifying the naming conventions. However this was not updated in the python interface, and some of the existing symbols are not exported. The definition table needs to copy the entry in module.c, no other simple tricks. Issue: kdave#995 Signed-off-by: David Sterba <[email protected]>
2ad7f80 to
90c6faf
Compare
Add python test cases for new aliases added in util lib version 0.1.3. DUe to the way the tests are done the cases are copied and adjusted. Eventually all the old versions are deleted, for now keep it intact for test coverage. Signed-off-by: David Sterba <[email protected]> [ Fix a typo in self tests. ] Signed-off-by: Qu Wenruo <[email protected]>
Add local patch from openSUSE that fixes symbol clash of parse_range with util-linux-2.41, in libblkid.a in particular. Author: Stanislav Brabec <[email protected]> Signed-off-by: David Sterba <[email protected]>
[ci skip] Signed-off-by: David Sterba <[email protected]>
The usage string incorrectly showed "btrfs-find-usage" instead of "btrfs-find-root", which could confuse users reading the help text. Signed-off-by: Dongjiang Zhu <[email protected]> Signed-off-by: David Sterba <[email protected]>
Since the kernel patch is queued for v6.19, add notes to scrub and dev-replace about the new behavior change. For scrub it's not a huge deal as we can just resume using 'btrfs scrub resume' command. But for dev-replace one has to start from the beginning, thus it's recommended to disable pm during dev-replace. Signed-off-by: Qu Wenruo <[email protected]> Signed-off-by: David Sterba <[email protected]>
CodeQL points out commented code, which is a macro to enable debugging. To make this more useful compile it unconditionally and provide under the debugging log level. Signed-off-by: David Sterba <[email protected]>
… also stripe aligned" This reverts commit 136c586. [BUG] There is a bug report that kernel is rejecting a converted btrfs that has dev extents beyond device boundary. The involved device extent is at 999627694980, length is 30924800, meanwhile the device is 999658557440. The device is size not aligned to 64K, meanwhile the dev extent is aligned to 64K. [CAUSE] For converted btrfs, the source fs has all its freedom to choose its size, as long as it's aligned to the fs block size. So when adding new converted data block groups we need to do extra alignment, but in make_convert_data_block_groups() we are rounding up the end, which can exceed the device size. [FIX] The original commit 136c586 ("btrfs-progs: convert: make sure the length of data chunks are also stripe aligned") is only a workaround to address a kernel bug. But since the kernel bug is long fixed, there isn't really much need to do the workaround, just revert it to avoid the dev extent to go beyond device size. Reported-by: Andieqqq <[email protected]> Signed-off-by: Qu Wenruo <[email protected]>
90c6faf to
97b14d3
Compare
kdave
approved these changes
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack, thanks
ab07a9a to
a0cd15c
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 reverts commit 136c586.
[BUG]
There is a bug report that kernel is rejecting a converted btrfs that has dev extents beyond device boundary.
The involved device extent is at 999627694980, length is 30924800, meanwhile the device is 999658557440.
The device is size not aligned to 64K, meanwhile the dev extent is aligned to 64K.
[CAUSE]
For converted btrfs, the source fs has all its freedom to choose its size, as long as it's aligned to the fs block size.
So when adding new converted data block groups we need to do extra alignment, but in make_convert_data_block_groups() we are rounding up the end, which can exceed the device size.
[FIX]
The original commit 136c586 ("btrfs-progs: convert: make sure the length of data chunks are also stripe aligned") is only a workaround to address a kernel bug.
But since the kernel bug is long fixed, there isn't really much need to do the workaround, just revert it to avoid the dev extent to go beyond device size.
Reported-by: Andieqqq [email protected]