@@ -21,7 +21,6 @@ package resizefs
21
21
import (
22
22
"context"
23
23
"fmt"
24
- "strings"
25
24
26
25
volumeapiv1 "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1"
27
26
volumeapiv1beta1 "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta1"
@@ -73,11 +72,6 @@ func (resizefs *resizeFs) resizeV1(devicePath string, deviceMountPath string) (b
73
72
}
74
73
_ , err = proxy .VolumeClient .ResizeVolume (context .Background (), request )
75
74
if err != nil {
76
- // Check if this is the Windows error indicating partition is already at correct size
77
- if strings .Contains (err .Error (), "The size of the extent is less than the minimum of 1MB" ) {
78
- klog .V (3 ).Infof ("Partition is already at target size (extent difference < 1MB), treating as success: %v" , err )
79
- return false , nil // Return false to indicate no resize was needed, but no error
80
- }
81
75
return false , err
82
76
}
83
77
return true , nil
@@ -103,11 +97,6 @@ func (resizefs *resizeFs) resizeV1Beta(devicePath string, deviceMountPath string
103
97
}
104
98
_ , err = proxy .VolumeClient .ResizeVolume (context .Background (), request )
105
99
if err != nil {
106
- // Check if this is the Windows error indicating partition is already at correct size
107
- if strings .Contains (err .Error (), "The size of the extent is less than the minimum of 1MB" ) {
108
- klog .V (3 ).Infof ("Partition is already at target size (extent difference < 1MB), treating as success: %v" , err )
109
- return false , nil // Return false to indicate no resize was needed, but no error
110
- }
111
100
return false , err
112
101
}
113
102
return true , nil
0 commit comments