mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rebase: update kubernetes dep to 1.24.0
As kubernetes 1.24.0 is released, updating kubernetes dependencies to 1.24.0 updates: #3086 Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
fc1529f268
commit
c4f79d455f
6
vendor/k8s.io/kubernetes/pkg/volume/util/fs/fs.go
generated
vendored
6
vendor/k8s.io/kubernetes/pkg/volume/util/fs/fs.go
generated
vendored
@ -24,9 +24,11 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
|
||||
servermetrics "k8s.io/kubernetes/pkg/kubelet/server/metrics"
|
||||
"k8s.io/kubernetes/pkg/volume/util/fsquota"
|
||||
)
|
||||
|
||||
@ -71,9 +73,13 @@ func DiskUsage(path string) (UsageInfo, error) {
|
||||
// First check whether the quota system knows about this directory
|
||||
// A nil quantity or error means that the path does not support quotas
|
||||
// or xfs_quota tool is missing and we should use other mechanisms.
|
||||
startTime := time.Now()
|
||||
consumption, _ := fsquota.GetConsumption(path)
|
||||
if consumption != nil {
|
||||
usage.Bytes = consumption.Value()
|
||||
defer servermetrics.CollectVolumeStatCalDuration("fsquota", startTime)
|
||||
} else {
|
||||
defer servermetrics.CollectVolumeStatCalDuration("du", startTime)
|
||||
}
|
||||
|
||||
inodes, _ := fsquota.GetInodes(path)
|
||||
|
Reference in New Issue
Block a user