mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
nfs: store the calling Context in NFSVolume
NFSVolume instances are short lived, they only extist for a certain gRPC procedure. It is easier to store the calling Context in the NFSVolume struct, than to pass it to some of the functions that require it. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
3d0c4e0659
commit
010fd816dd
@ -91,7 +91,7 @@ func (cs *Server) CreateVolume(
|
||||
}
|
||||
defer cr.DeleteCredentials()
|
||||
|
||||
nfsVolume, err := NewNFSVolume(backend.VolumeId)
|
||||
nfsVolume, err := NewNFSVolume(ctx, backend.VolumeId)
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.InvalidArgument, err.Error())
|
||||
}
|
||||
@ -128,7 +128,7 @@ func (cs *Server) DeleteVolume(
|
||||
}
|
||||
defer cr.DeleteCredentials()
|
||||
|
||||
nfsVolume, err := NewNFSVolume(req.GetVolumeId())
|
||||
nfsVolume, err := NewNFSVolume(ctx, req.GetVolumeId())
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.InvalidArgument, err.Error())
|
||||
}
|
||||
|
Reference in New Issue
Block a user