Revision e87a419f

b/Ganeti/HTools/Node.hs
242 242

  
243 243
-- | Sets the max cpu usage ratio
244 244
setMcpu :: Node -> Double -> Node
245
setMcpu t val = t { mCpu = val, hiCpu = floor (val * tCpu t) }
245
setMcpu t val = t { mCpu = val, hiCpu = hcpu }
246
    where new_hcpu = floor (val * tCpu t)::Int
247
          hcpu = if new_hcpu < 0
248
                 then noLimitInt
249
                 else new_hcpu
246 250

  
247 251
-- | Computes the maximum reserved memory for peers from a peer map.
248 252
computeMaxRes :: P.PeerMap -> P.Elem

Also available in: Unified diff