rbd: make cleanupRBDImage a function of rbdVolume

Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos 2025-01-20 16:47:34 +01:00
parent 6965c434ed
commit 075abcac67

View File

@ -981,12 +981,12 @@ func (cs *ControllerServer) DeleteVolume(
}
defer cs.VolumeLocks.Release(requestName)
return cleanupRBDImage(ctx, rbdVol, cr)
return rbdVol.cleanupRBDImage(ctx, cr)
}
// cleanupRBDImage removes the rbd image and OMAP metadata associated with it.
func cleanupRBDImage(ctx context.Context,
rbdVol *rbdVolume, cr *util.Credentials,
func (rbdVol *rbdVolume) cleanupRBDImage(ctx context.Context,
cr *util.Credentials,
) (*csi.DeleteVolumeResponse, error) {
info, err := rbdVol.GetMirroringInfo(ctx)
if err != nil {