Skip to content

Commit

Permalink
Merge pull request #1047 from wongma7/iscorruptedmnt
Browse files Browse the repository at this point in the history
Fix windows build IsCorruptedMnt not implemented
  • Loading branch information
k8s-ci-robot committed Sep 8, 2021
2 parents 3b6a45a + 235237b commit c428c04
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/driver/mount_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit c428c04

Please sign in to comment.