From 235237b17837693d04c6c592432088dd126c7e43 Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Wed, 8 Sep 2021 13:28:02 -0700 Subject: [PATCH] Fix windows build IsCorruptedMnt not implemented --- pkg/driver/mount_windows.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/driver/mount_windows.go b/pkg/driver/mount_windows.go index 3b47360b91..024682a149 100644 --- a/pkg/driver/mount_windows.go +++ b/pkg/driver/mount_windows.go @@ -24,6 +24,7 @@ import ( "regexp" "github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/mounter" + mountutils "k8s.io/mount-utils" ) func (m NodeMounter) FormatAndMount(source string, target string, fstype string, options []string) error { @@ -69,6 +70,11 @@ func (m NodeMounter) GetDeviceNameFromMount(mountPath string) (string, int, erro return deviceName, 1, nil } +// IsCorruptedMnt return true if err is about corrupted mount point +func (m NodeMounter) IsCorruptedMnt(err error) bool { + return mountutils.IsCorruptedMnt(err) +} + func (m *NodeMounter) MakeFile(path string) error { proxyMounter, ok := m.SafeFormatAndMount.Interface.(*mounter.CSIProxyMounter) if !ok {