Use utilexec.Interface instead of SafeFormatAndMount as filed of ResizeFs

This commit is contained in:
drfish
2021-02-20 22:28:43 +08:00
parent a04ab9debf
commit eb0b61912f
4 changed files with 21 additions and 18 deletions

View File

@@ -264,11 +264,6 @@ func MergeResizeConditionOnPVC(
// GenericResizeFS : call generic filesystem resizer for plugins that don't have any special filesystem resize requirements
func GenericResizeFS(host volume.VolumeHost, pluginName, devicePath, deviceMountPath string) (bool, error) {
mounter := host.GetMounter(pluginName)
diskFormatter := &mount.SafeFormatAndMount{
Interface: mounter,
Exec: host.GetExec(pluginName),
}
resizer := mount.NewResizeFs(diskFormatter)
resizer := mount.NewResizeFs(host.GetExec(pluginName))
return resizer.Resize(devicePath, deviceMountPath)
}