-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btrfs-progs: tune: do not allow multiple incompatible features to be set
[PROBLEM] Btrfstune allows multiple different options to be executed in one go, some options are completely fine, like no-holes along with extref, but with more and more options, we need more exclusive checks. In fact a lot of new options are already not following the old success/total checks. [ENHANCEMENT] There is really no need to allow multiple features to be set in one go. So this patch introduces an array which groups all the compatible options into following categories: - Extent tree This includes converting to/from extent and block group tree. - Space cache This includes converting to v2 space cache. - Metadata UUID This includes changing metadata uuid. - FSID change This includes the slower full fs fsid rewrites. - Csum change This includes the csum rewrites. - Seed devices This includes changing the device seed flag. - Legacy options This includes no-holes/extref/skinny-metadata features, which are already default mkfs features. Now we only allow options inside the same group to be specified. E.g. "btrfstune -r -S 1" would fail as it includes both legacy and seed groups. Meanwhile "btrfstune -r -n" would still be allowed. Signed-off-by: Qu Wenruo <[email protected]> Signed-off-by: David Sterba <[email protected]>
- Loading branch information
1 parent
776edd3
commit 76f0670
Showing
1 changed file
with
83 additions
and
38 deletions.
There are no files selected for viewing
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