Skip to content

Commit

Permalink
fix typo/s rockstor#2525
Browse files Browse the repository at this point in the history
  • Loading branch information
phillxnet committed Apr 17, 2023
1 parent 5c474d1 commit bf8dbab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rockstor/fs/btrfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1821,15 +1821,15 @@ def usage_bound(disk_sizes, num_devices, raid_level):
# number of stripes
chunks = num_devices

if raid_level.startwith(("unknown", "single")):
if raid_level.startswith(("unknown", "single")):
chunks = 1
# We have no mixed raid levels with raid0, but in case we encounter them:
elif raid_level.startwith("raid0"):
elif raid_level.startswith("raid0"):
stripes = 2
# Take care not to match raid10 before its time:
elif raid_level == "raid1" or raid_level.startwith("raid1-"):
elif raid_level == "raid1" or raid_level.startswith("raid1-"):
chunks = 2
elif raid_level.startwith("raid10"):
elif raid_level.startswith("raid10"):
stripes = max(2, int(num_devices / 2))

# Round down so that we have an exact number of duplicate copies
Expand Down

0 comments on commit bf8dbab

Please sign in to comment.