Skip to content

Commit

Permalink
poolmanager: fix typo
Browse files Browse the repository at this point in the history
weghtedPools -> weightedPools

Acked-by: Paul Millar
Target: master
Require-book: no
Require-notes: no
  • Loading branch information
kofemann committed Nov 27, 2024
1 parent 9023cea commit 69f5c77
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,18 @@ private WeightedPool[] toWeightedWritePoolsArray(Collection<PoolInfo> costInfos)
totalFree += spaceToUse;
}

WeightedPool[] weghtedPools = new WeightedPool[costInfos.size()];
WeightedPool[] weightedPools = new WeightedPool[costInfos.size()];
int i = 0;
for (PoolInfo costInfo : costInfos) {
long spaceToUse = costInfo.getCostInfo().getSpaceInfo().getFreeSpace()
+ costInfo.getCostInfo().getSpaceInfo().getRemovableSpace();

weghtedPools[i] = new WeightedPool(costInfo, (double) spaceToUse / totalFree);
weightedPools[i] = new WeightedPool(costInfo, (double) spaceToUse / totalFree);
i++;
}

Arrays.sort(weghtedPools, new CostComparator());
return weghtedPools;
Arrays.sort(weightedPools, new CostComparator());
return weightedPools;
}

private static class CostComparator implements Comparator<WeightedPool>
Expand Down

0 comments on commit 69f5c77

Please sign in to comment.