You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This removes the tools-side online shrink precheck from bcachefs device resize so mounted filesystems can delegate smaller target sizes to the kernel resize ioctl.
That keeps current kernels honest: if shrink is unsupported, the ioctl still fails, now with shrink-specific context from the CLI.
The offline path still rejects shrinking because the bundled userspace/libbcachefs implementation has not gained the shrink machinery yet.
This is an independent tools-side delegation patch that matches the CLI boundary discussed around koverstreet/bcachefs#1070; it does not import or flatten the older shrink implementation branch. The full tools-targeted shrink stack is carried separately in #742 with original Jul Lang / Codex commits preserved where practical and Komzpa tools adaptations split at the tail.
Cherry-picked to the testing branch as device: let online resize delegate shrink to kernel (2263343), authorship preserved. Thanks — right layering: the kernel is the authority on whether shrink is supported, so the online path should delegate rather than hardcode a userspace precheck. That also fixes the older-tool/newer-kernel case, where the hardcoded gate would wrongly block a shrink the loaded module supports, and uses the kernel's authoritative bucket count instead of the tool's cached usage. Verified the offline path keeps its own independent shrink guard (resize_offline still bails), and the kernel rejects online shrink before any mutation ('Cannot shrink yet'), so there's no data risk in the interim. Merging via cherry-pick rather than the merge button, so closing manually.
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
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 removes the tools-side online shrink precheck from
bcachefs device resizeso mounted filesystems can delegate smaller target sizes to the kernel resize ioctl.That keeps current kernels honest: if shrink is unsupported, the ioctl still fails, now with shrink-specific context from the CLI.
The offline path still rejects shrinking because the bundled userspace/libbcachefs implementation has not gained the shrink machinery yet.
This is an independent tools-side delegation patch that matches the CLI boundary discussed around koverstreet/bcachefs#1070; it does not import or flatten the older shrink implementation branch. The full tools-targeted shrink stack is carried separately in #742 with original Jul Lang / Codex commits preserved where practical and Komzpa tools adaptations split at the tail.
Related to #268, koverstreet/bcachefs#781, koverstreet/bcachefs#1070, and koverstreet/bcachefs#1073.
Does not claim full filesystem shrinking support by itself.
Validation:
BINDGEN=/home/kom/.cargo/bin/bindgen make -j32BINDGEN=/home/kom/.cargo/bin/bindgen cargo check -qgit diff --check./target/release/bcachefs device resize --help81ee809c6d8922a04c0e5d2cebbb19f7950ad47e