@@ -21,7 +21,6 @@ package resizefs
2121import (
2222 "context"
2323 "fmt"
24- "strings"
2524
2625 volumeapiv1 "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1"
2726 volumeapiv1beta1 "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta1"
@@ -73,11 +72,6 @@ func (resizefs *resizeFs) resizeV1(devicePath string, deviceMountPath string) (b
7372 }
7473 _ , err = proxy .VolumeClient .ResizeVolume (context .Background (), request )
7574 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- }
8175 return false , err
8276 }
8377 return true , nil
@@ -103,11 +97,6 @@ func (resizefs *resizeFs) resizeV1Beta(devicePath string, deviceMountPath string
10397 }
10498 _ , err = proxy .VolumeClient .ResizeVolume (context .Background (), request )
10599 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- }
111100 return false , err
112101 }
113102 return true , nil
0 commit comments