Skip to content

Commit 12acd1f

Browse files
committed
use Info method of util/fs package instead of FsInfo
The FsInfo method has been replaced with Info method and this commit make the required changes Signed-off-by: Humble Chirammal <[email protected]>
1 parent f83eff3 commit 12acd1f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/kubernetes-csi/csi-driver-host-path
22

3-
go 1.19
3+
go 1.18
44

55
require (
66
github.com/container-storage-interface/spec v1.6.0

pkg/hostpath/healthcheck.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func checkMountPointExist(volumePath string) (bool, error) {
128128

129129
func (hp *hostPath) checkPVCapacityValid(volID string) (bool, error) {
130130
volumePath := hp.getVolumePath(volID)
131-
_, fscapacity, _, _, _, _, err := fs.FsInfo(volumePath)
131+
_, fscapacity, _, _, _, _, err := fs.Info(volumePath)
132132
if err != nil {
133133
return false, fmt.Errorf("failed to get capacity info: %+v", err)
134134
}
@@ -143,12 +143,12 @@ func (hp *hostPath) checkPVCapacityValid(volID string) (bool, error) {
143143
}
144144

145145
func getPVStats(volumePath string) (available int64, capacity int64, used int64, inodes int64, inodesFree int64, inodesUsed int64, err error) {
146-
return fs.FsInfo(volumePath)
146+
return fs.Info(volumePath)
147147
}
148148

149149
func (hp *hostPath) checkPVUsage(volID string) (bool, error) {
150150
volumePath := hp.getVolumePath(volID)
151-
fsavailable, _, _, _, _, _, err := fs.FsInfo(volumePath)
151+
fsavailable, _, _, _, _, _, err := fs.Info(volumePath)
152152
if err != nil {
153153
return false, err
154154
}

0 commit comments

Comments
 (0)