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 {