mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rbd: pass context.Context to rbdVolume.resize()
While adding the context.Context to the resizeRBDimage() function, it became a little ugly. So renaming the function to resize() and making it a method of the rbdVolume type. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
36469b87e2
commit
be9e7cf956
@ -1092,7 +1092,7 @@ func (cs *ControllerServer) ControllerExpandVolume(ctx context.Context, req *csi
|
||||
util.DebugLog(ctx, "rbd volume %s size is %v,resizing to %v", rbdVol, rbdVol.VolSize, volSize)
|
||||
rbdVol.VolSize = volSize
|
||||
nodeExpansion = true
|
||||
err = resizeRBDImage(rbdVol, cr)
|
||||
err = rbdVol.resize(ctx, cr)
|
||||
if err != nil {
|
||||
klog.Errorf(util.Log(ctx, "failed to resize rbd image: %s with error: %v"), rbdVol, err)
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
|
Reference in New Issue
Block a user