Skip to content

Commit

Permalink
Don't use btrfs_increase_percent for snapshots size warning
Browse files Browse the repository at this point in the history
  • Loading branch information
shundhammer committed Feb 7, 2017
1 parent e027f08 commit 89ffad6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/include/partitioning/custom_part_check_generated.rb
Expand Up @@ -862,7 +862,6 @@ def check_extended_delete(curr_disk, installation)
# @return [Boolean] true if ok, false if a warning should be shown
#
def check_root_for_snapshot_size(part)
log.info("check_root_for_snapshot_size: part: #{part}")
return true unless Mode.installation
return true unless part["mount"] == "/"
return true unless part["used_fs"] == :btrfs
Expand Down Expand Up @@ -892,10 +891,7 @@ def format_size_k(size_k)
#
def recommended_root_size_k_for_snapshots
proposal_settings = StorageProposal.GetControlCfg()
root_base_k = 1024 * (proposal_settings["root_base"] || 0)
btrfs_inc = proposal_settings["btrfs_increase_percentage"] || 0
log.info("recommended_root: base: #{root_base_k/(1024*1024.0)} GiB inc: #{btrfs_inc}%")
root_base_k * (1.0 + btrfs_inc / 100.0)
1024 * (proposal_settings["root_base"] || 0)
end

# Show a warning that the root partition is too small.
Expand Down

0 comments on commit 89ffad6

Please sign in to comment.