Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Dev-manager canUse calc: fix operator order #717

Merged
merged 2 commits into from
Aug 31, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/pmem-device-manager/pmd-lvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ const (
func setupNS(r *ndctl.Region, percentage uint) error {
align := GB
realalign := align * r.InterleaveWays()
canUse := uint64(percentage) * (r.Size() / 100)
canUse := uint64(percentage) * r.Size() / 100
klog.V(3).Infof("Create fsdax-namespaces in %v, allowed %d %%, real align %d:\ntotal : %16d\navail : %16d\ncan use : %16d",
r.DeviceName(), percentage, realalign, r.Size(), r.AvailableSize(), canUse)
// Subtract sizes of existing active namespaces with currently handled mode and owned by pmem-csi
Expand Down