rbd: make rbdImage as received for internal methods

Currently most of the internal methods have the
rbdVolume as the received. As these methods
are completely internal and requires only
the fields of the rbdImage use rbdImage
as the receiver instead of rbdVolume.

updates #2742

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2022-01-12 19:21:31 +05:30
committed by mergify[bot]
parent 2daf2f9f0c
commit ba5809e191
3 changed files with 123 additions and 122 deletions

View File

@ -593,7 +593,7 @@ func (cs *ControllerServer) createVolumeFromSnapshot(
parentVol.conn = rbdVol.conn.Copy()
if rbdVol.ThickProvision {
err = parentVol.DeepCopy(rbdVol)
err = parentVol.DeepCopy(&rbdVol.rbdImage)
if err != nil {
return status.Errorf(codes.Internal, "failed to deep copy %q into %q: %v", parentVol, rbdVol, err)
}